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

Answer Posted / tclgeek

{(^[1-9]|^[0-9][0-9]|^1[0-9][0-9]|^2[0-5][0-5])\.([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-5][0-5])\.([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-5][0-5])\.([0-9]$|[0-9][0-9]$|1[0-9][0-9]$|2[0-5][0-4]$)}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is perl I used for?

525


What does Perl do if you try to exploit the execve(2) race involving setuid scripts?

523


What rules must be followed by modules in perl.

557


Difference between the variables in which chomp function work ?

597


How will you open a file in a write-only mode in perl?

474






You want to print the contents of an entire array. How would you do that?

519


Define dynamic scoping.

499


what are the strategies followed for multiple form interaction in cgi programs?

504


What is 'rollback' command in perl?

543


List the data types that Perl can handle?

568


In Perl, there are some arguments that are used frequently. What are that arguments and what do they mean?

530


What are the different instances used in cgi overhead?

572


What is the use of 'ne' operator?

488


How do you set environment variables in perl?

550


explain the various functions/directives in perl that allow you to include/import a module. Also, state the differences between them.

460