blueloveTH d513a3b459 ...
2023-04-23 12:42:42 +08:00

529 B

icon label
package 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.