Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / treddy

Hi all,
Here is the regular expression for matching the valid ip
address.
^(25[0-5]|2[0-4]{0,1}[0-9]{0,1}|1[0-9]{1,2}|[0-9]{1,2})[.](25[0-5]|2[0-4]{0,1}[0-9]{0,1}|1[0-9]{1,2}|[0-9]{1,2})[.](25[0-5]|2[0-4]{0,1}[0-9]{0,1}|1[0-9]{1,2}|[0-9]{1,2})[.](25[0-5]|2[0-4]{0,1}[0-9]{0,1}|1[0-9]{1,2}|[0-9]{1,2})$

Let me know your comments.

Thanks,
TReddy

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you turn on the perl warnings?

905


Explain the execution of a program in perl.

967


How to remove a directory in perl?

968


Give an example of using the -n and -p option.

980


What are the various flags/arguments that can be used while executing a perl program?

868


what is Polymorphism in Perl?

945


How do you you check the return code of a command in perl?

970


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

1036


How many loop control keywords are there in perl?

919


How to change a directory in perl?

911


Where do we require ‘chomp’ and what does it mean?

967


How many data types are there in perl?

937


How and what are closures implemented in perl?

870


Explain use of ‘my’ keyword in perl?

923


What does the qq{ } operator do?

931