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
How can you replace the characters from a string and save the number of replacements?
Does Perl have reference type?
What is the use of "stderr()"?
In Perl we can show the warnings using some options in order to reduce or avoid the errors. What are that options?
Give an example of using the -n and -p option.
what is Perl one liner?
How will you declare a variable in perl?
Explain which feature of PERL provides code reusability?
Explain the execution of a program in perl.
How can you define “my” variables scope in Perl and how it is different from “local” variable scope?
Explain the different types of data perl can handle.
Explain string comparison operators in perl.
What does -> symbol indicates in Perl?
What is confess function in perl?
How do I print the entire contents of an array with Perl?