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

Answer Posted / abhishek sagar

(/(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/ && $1 < 255 &&
$2 < 255 && $3 < 255 && $4 < 255 )

Is This Answer Correct ?    23 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does polymorphism work in perl? Give an example.

475


What is perl programming?

547


How can you call a subroutine and identify a subroutine?

500


How to determine strings length in perl?

530


How to merge two arrays in perl?

517






Why -w argument is used with perl programs?

550


Does Perl have objects? If yes, then does it force you to use objects? If no, then why?

540


What can be done for efficient parameter passing in perl?

471


Write syntax to add two arrays together in perl?

538


What is perl? What is the basic command to print a string in perl?

472


List the data types that Perl can handle?

568


You want to empty an array. How would you do that?

471


What does the q{ } operator do?

511


Write a cgi program to show the header part?

515


What are scalars?

542