Write a simple regular expression to match an IP address,
e-mail address, city-state-zipcode combination.
Answer Posted / arup
Below Solution is applicable IP only :
(/(\d{1,})\.(\d{1,})\.(\d{1,})\.(\d{1,})/ && $1<256 &&
$2<256 && $3<256 && $4<256)
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Explain returning values from subroutines?
In Perl, what is grep function used for?
You want to print the contents of an entire array. How would you do that?
What are the purpose of close(), getc() and read() functions?
What are arrays in perl?
What is perl scripting?
How to access parameters passed to a subroutine in perl?
How can you define “my” variables scope in Perl and how it is different from “local” variable scope?
What does perl do in linux?
What is the difference between exec and system?
What are some common methods to all handles in perl?
What is the difference between use and require in perl?
How to start perl in interactive mode?
How to replace perl array elements?
what is the main function of fork() in cgi programming?