mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 19:40:18 +00:00
22 lines
529 B
Markdown
22 lines
529 B
Markdown
---
|
|
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.
|
|
|