fork download
  1. %{
  2. #undef yywrap
  3. #define yywrap()
  4. #include<stdio.h>
  5. }%
  6.  
  7.  
  8. %%
  9. ((http)|(ftp))s?:\/\/[a-zA-Z0-9]{2, }(\.[a-z]{2, })
  10. +(\/[a-zA-Z0-9+=?]*)*{printf("\nURL Valid\n");}
  11.  
  12. +{printf("\nURL Inalid\n");}
  13.  
  14. %%
  15.  
  16. // driver program
  17. void main()
  18. {
  19. printf("\nEnter URL:");
  20. yylex();
  21. printf("\n");
  22. return 0;
  23. }
Success #stdin #stdout #stderr 0.02s 7012KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/buYZq8/prog:23:0: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit