Question: Note: If you use the regex editor to design your modified regex, do not forget to change the mode to global & multi-line in the

 Note: If you use the regex editor to design your modified

Note: If you use the regex editor to design your modified regex, do not forget to change the mode to global \& multi-line in the regex editor. In the below image, there are four names. The following regular expression matches the first two and last names. \w{3,}\s(\w\s)?\w{3,} Note: while the above regex expression was authored to also match other names of interest (not shown), you can focus on just the 4 example names. Modify the above regex expression to result in only the following matches: John-DoeJohn-M=DoeJohn-Mr-DoeJohn-Deere Then incorporate the regex into a program to search for the regex - so, use re.search(). Iterate over the names, and if the regex is not found, print 'No match found'. If found, print the match object. import re myText=open(Johns.txt,encoding="IS0-8859-1")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!