#compsci #python 

## Methods
![[Python string methods and functions]]
## Facts I guess
\t is a special character for a tab, \n - for a line break.

### Pattern matching
To do [[Pattern matching|pattern matching]], we must import the module [[re module|re]]

E.g:
```python
import re
match=re.match('Hello[ \t]*(.*)world', 'Hello    Python world'
# match.group(1) = 'Python '
```
This example searches for a substring that begins with the word "Hello", followed by zero or more tabs or spaces, followed by arbitrary chararcters to be saved as a matched group, terminated by the word "world.".