Write a simple regular expression to match an IP address,
e-mail address, city-state-zipcode combination.

Answer Posted / raghav

For IP Address

/([0-255])(\.)$1\1$1\1$1/;

For other question answer may vary depending on the
requirement.

Is This Answer Correct ?    22 Yes 31 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the various uses of perl?

530


How do I do fill_in_the_blank for each file in a directory?

546


How to read a directory in perl?

534


If you want to empty an array then how would you do that?

579


What are prefix dereferencer? List them.

568






How does polymorphism work in perl? Give an example.

483


List the prefix dereferencer in Perl.

572


How do you match one letter in the current locale?

559


Explain about the applications of perl?

546


Explain gmtime() function in perl?

566


How to access parameters passed to a subroutine in perl?

543


What are scalars?

551


Which operator in perl is used for the concatenation of two strings?

500


You want to open and read data files with perl. How would you do that?

503


What are the purpose of close(), getc() and read() functions?

484