September 2018
Intermediate to advanced
398 pages
11h 32m
English
The re.search function matches a pattern, no matter its position in the string. As explained previously, this will return None if the pattern is not found, or a match object.
The following special characters are used:
More special characters are shown in the next recipe.
In step 6 in the How to do it... section, the r'[0123456789-]+' pattern is composed of two parts. The first one is between square brackets, and matches any single character between 0 and 9 (any number) and the dash (-) character. The + sign after that means that this character ...
Read now
Unlock full access