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
What does the q{ } operator do?
Why to use perl?
How does a “grep” function perform?
What is warn function in perl?
How many data types are there in perl?
Can you add two arrays together?
What is the usage of -i and 0s options?
How will you open a file in read-only mode in perl?
Explain what is the scalar data and scalar variables in Perl?
There are two types of eval statements i.e. Eval expr and eval block. Explain them.
What is the importance of perl warnings?
Explain the arguments for perl interpreter.
What is the difference between perl array and perl hash?
What does 'do' statement do in perl?
How are parameters passed to subroutines in perl?