You are using `re` without importing it:

```python
import re
```