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

Answer Posted / mukesh

/(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/


ip=$1;

Is This Answer Correct ?    27 Yes 20 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain chomp?

510


What is the usage of -i and 0s options?

542


Differentiate between use and require, my and local, for and foreach and exec and system

480


What is warn function in perl?

526


What is perl I used for?

525






what is the function of Return Value?

558


How do you set environment variables in perl?

550


Explain the various characteristics of perl.

516


How do I replace every character in a file with a comma?

525


What is epoch time in perl?

517


What are the various perl data types based on the context?

533


Explain cpan?

527


What does length(%HASH) produce if you have thirty-seven random keys in a newly created hash?

568


Explain which feature of PERL provides code reusability?

720


Explain the difference between "my" and "local" variable scope declarations. ?

561