Program to identify valid emai id.

%{
#include<stdio.h>
%}
%%
([a-zA-Z0-9['.']+['@'][a-z]+['.'][a-z]+) {printf("it is valid email id");}
%%
main()
{
yylex();
}

Comments

Popular posts from this blog

Lex program for counting keyword and identifier

A program to find FIRST of non-terminals of the given grammar

There are two kangaroos on an x-axis ready to jump in the positive direction (i.e, toward positive infinity). The first kangaroo starts at location x1 and moves at a rate of v1 meters per jump. The second kangaroo starts at location x2 and moves at a rate of v2 meters per jump. Given the starting locations and movement rates for each kangaroo, can you determine if they'll ever land at the same location at the same time?