Yes it is matching 167.249.0.0 . -Sunita -----Original Message----- From: Jim Gibson [mailto:jimsgib...@gmail.com] Sent: Saturday, April 09, 2011 11:50 PM To: Perl Beginners Subject: Re: regular expression for email id and IP address
At 11:42 PM +0530 4/9/11, Sunita Rani Pradhan wrote: >Hi All > > > > > > 1. Can anybody guide me to write a regular expression to >verify correct Email address ? peldoc -q valid "How do I check a valid mail address?" > > > >2. I have written a regular expression to verify correct IP address : > > > >print $ipadd if ($ipadd =~ >/^([0-9])|([1-9][0-9])|([1-2][0-5][0-5])\.([0-9])|([1-9][0-9])|([1-2][0 - >5][0-5])\.([0-9])|([1-9][0-9])|([1-2][0-5][0-5])\.([0-9])|([1-9][0-9])| ( >[1-2][0-5][0-5])/); > > > >It is working as per my input . Please let me know if it correct or not >. I don't believe it is correct. Does it match 167.249.0.0? -- Jim Gibson j...@gibson.org -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/