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

Write syntax to use grep function?

910


Explain 'grep' function.

923


How do you give functions private variables that retain their values between calls?

895


In Perl, what is grep function used for?

1008


Explain '->' in perl?

870


what are steps to do to lock the sony ericsson mobile with password?

2139


You want to empty an array. How would you do that?

846


What's the difference between /^Foo/s and /^Foo/?

1099


Explain the functioning of conditional structures in perl.

875


How do find the length of an array?

1049


What can be done for efficient parameter passing in perl? Explain.

958


Create a function that is only available inside the scope where it is defined ?

949


How to concatenate strings in perl?

987


How to read a file into a hash array?

989


What are the advantages of programming in perl?

951