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

Answer Posted / vyvyan

ip_pattern = r'\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b'

Is This Answer Correct ?    26 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

explain the various functions/directives in perl that allow you to include/import a module. Also, state the differences between them.

458


Define print() function in perl?

544


what are the steps involved in reading a cgi script on the server?

488


How do I debug a perl program?

513


how to connect cisco switch uisng perl script

3377






How to convert strings into an array in perl?

510


You want to add two arrays together. How would you do that?

476


How to read a single line from a file in perl?

530


How to close a file in perl?

485


Explain returning values from subroutines?

531


Hi, I am a accountant. I am preparing a balance sheet but because of staff shortage and time pressures I cant complete it on time. There is lot of common data with last years which I need not retype and I can manage by editing last year’s balance sheet ? Is their any software on net where I can do this easily??

1752


What is goto statement in perl?

508


Write syntax to add two arrays together in perl?

536


How to read from a pipeline with Perl

539


What are the various uses of perl?

518