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

Why aren't Perl's patterns regular expressions?

1082


Assuming both a local($var) and a my($var) exist, what's the difference between ${var} and ${"var"}?

930


How to read a file into a hash array?

991


What does perl do in linux?

887


Which operator in perl is used for the concatenation of two strings?

951


What is perl? What is the basic command to print a string in perl?

832


what is the difference between java and cgi?

1005


How can memory be managed in Perl?

974


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

841


Differentiate use and require?

884


What is subroutine in perl?

889


How to concatenate strings in perl?

989


Can you add two arrays together?

866


Write an example explaining the use of symbol tables.

904


What are prefix dereferencer?

851