Question: You're learning about regular expressions in Python and want to practice using them for various text - processing tasks. Write Python code that accomplishes the
You're learning about regular expressions in Python and want to practice using them for various textprocessing tasks. Write Python code that accomplishes the following:
a Import the re module for regular expressions.
b Ask the user to enter a text string.
c Use regular expressions to check if the string contains any email addresses follow the common email format
d Use regular expressions to find and print all the words that start with a capital letter.
e Use regular expressions to count and print the number of numeric values integers and decimals in the string.
f Print the results of each operation.
Test your code with various input strings to correctly handle different scenarios.
Example Output:
Enter a text string: Please contact
support@example.com for assistance. The product is priced at $
Does the string contain any email addresses? True
Email addresses found: support@example.com
Words starting with a capital letter: Please
Number of numeric values in the string:
Python
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
