fork download
  1. %{
  2. #include<stdio.h>
  3. #include<string.h>
  4. %}
  5. %%
  6. \+91-[1-9][0-9]{9} {printf("%s is a valid phone number",yytext);}
  7. %%
  8. int main(){
  9. yylex();
  10. return 0;
  11. }
  12. int yywrap(){
  13. return 1;
  14. }
Success #stdin #stdout #stderr 0.02s 6924KB
stdin
+91-9567547656
stdout
Standard output is empty
stderr
ERROR: /home/2K5R52/prog:14:0: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit