lex program to eliminate html tags

 

 

%{
#include<stdio.h>
%}
%%
(“<“|”<\\”)[a-z|A-Z|0-9]*”>”    {printf(” “);}
%%
main()
{
yylex();
return 0;
}
int yywrap()
{
}

Sample output

<html>test file<\html>
test file

Leave a Reply

Your email address will not be published. Required fields are marked *