November 2017
Beginner to intermediate
204 pages
5h 23m
English
Recall that the search() method returns a match object if it locates the pattern in the search string. If you save the match object to a variable, you can use the group() function of the match object to retrieve the first occurrence of the pattern in the search string:
....match = number_then_word.search("**** 1234 abcd ****")print(match.group())
Read now
Unlock full access