Question: write a function matches(pattern, target list): that performs a regular expression search of pattern on each of the targets in targetlist. The function should build

write a function

matches(pattern, target list):

that performs a regular expression search of pattern on each of the targets in targetlist. The function should build a list that, for each target that both successfully finds a match, and the match is the entire string, includes the matched string/target. For any target that does not match, or where less than the full target is matched, nothing is added to the resultant list.

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!