--- icon: package label: re --- ### `re.match(pattern, string)` Return a match object if the string matches the pattern, and `None` otherwise. (force match at the beginning of the string) ### `re.search(pattern, string)` Return a match object if the string matches the pattern, and `None` otherwise. ### `re.split(pattern, string)` Split the string by the occurrences of the pattern. ### `re.sub(pattern, repl, string)` Return a copy of the string with all occurrences of the pattern replaced by the replacement string.