if the string is not found, `re.search` returns `None` so calling `group` will raise an `AttributeError`:

```python
>>> import re
>>> R=re.compile('e')
>>> R.search('foo').group(1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'group'
```