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
What is the peculiarity of returning values by subroutines in perl?
Write a program to decode the data in the form using cgi programming
Explain about typeglobs?
What can be done for efficient parameter passing in perl? Explain.
How can you replace the characters from a string and save the number of replacements?
You want to empty an array. How would you do that?
Why do you use Perl?
What does `new $cur->{LINK}' do? (Assume the current package has no new() function of its own.)
There is no strict data types in perl unlike in other high level languages like Java so wouldn't that be a problem if a code in perl is to be a written by a big team of 20+ members ?"
What are the steps involved when the cgi program starts running?
How to replace perl array elements?
How does polymorphism work in perl?
You want to concatenate strings with perl. How would you do that?
How will you open a file in a write-only mode in perl?
What are the two ways to get private values inside a subroutine?