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 / anshuman

/^([1-9]|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.([0-9]|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.([0-9]|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.([0-9]|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])$/



All those above answer are wrong...because all of them take

0.0.0.0 as valid IP address which is not the case...with computer science ...

Developed By Anshuman sengupta

Reviewed by Arnab Bose

Tested by Avishek chatterjee

Is This Answer Correct ?    1 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does next statement do in perl?

974


Explain the difference between die and exit in perl?

858


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

928


Explain 'grep' function.

958


How to concatenate strings with perl?

845


Comment on array slicing and range operator

932


How to renaming a file in perl programming?

1023


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

950


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

977


What does read () command do?

909


How do I generate a list of all .html files in a directory?

931


How to check the status of airplane mode (enable/disable) in perl for Android mobile?

3072


what is Chop & Chomp function does?

973


What does the qx{ } operator do?

894


Explain what is STDIN, STDOUT and STDERR?

1017