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.

Answers were Sorted based on User's Feedback



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

Answer / sanjiv

/(\d{3}\.){3}\d+/

Is This Answer Correct ?    3 Yes 6 No

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

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

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

Answer / raghav

For IP Address

/([0-255])(\.)$1\1$1\1$1/;

For other question answer may vary depending on the
requirement.

Is This Answer Correct ?    22 Yes 31 No

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

Answer / gopal

I hope this is the right way to match IP address

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

Is This Answer Correct ?    12 Yes 24 No

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

Answer / leo

/(\d+)(\.\d+){3}/)

Is This Answer Correct ?    4 Yes 16 No

Post New Answer

More CGI Perl Interview Questions

What is the difference between die and exit in perl?

0 Answers   HCL,


What is the purpose of goto expr statement?

0 Answers  


What is an interpolation in perl?

0 Answers  


What is the use of now constructor in perl?

0 Answers  


What are the steps involved in configuring a server using cgi programming?

0 Answers  


What are the logical operators used for small scale operations? Explain them briefly.

0 Answers  


Explain about the applications of perl?

0 Answers  


write a script to check whether user enter a value is a leap year or not?

3 Answers   Oracle, Persistent, ViPrak,


Explain returning values from subroutines?

0 Answers  


What is automatic error handling in perl?

0 Answers  


There is no strict data types in perl unlike in other high level languages like Java so wouldn't that be a problem if a code in perl is to be a written by a big team of 20+ members ?"

0 Answers   Cisco, Oracle,


Why Perl aliases are considered to be faster than references?

0 Answers  


Categories