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 the difference between localtime() and gmtime() functions?

548


what is CPAN?

549


Create a function that is only available inside the scope where it is defined ?

551


What are perl variables?

528


What is perl scripting?

516






Write a program to decode the data in the form using cgi programming

548


What are the options that can be used to avoid logic errors in perl?

521


How the interpreter is used in Perl?

534


What is the use of -t?

550


Write a program to show the process of spawning a child process

452


Define perl scripting?

577


Perl uses single or double quotes to surround a zero or more characters. Are the single(' ') or double quotes (" ") identical?

529


Can you add two arrays together?

528


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

489


Explain a tell function in perl?

542