I have this word: word = 'ROTONDE04)'
. I would like to clean it and keep only letters.
Therefore I tried:
>>> re.search('[^a-zA-Z].', word)
<re.Match object; span=(7, 9), match='04'>
Why is the parenthesis not returned by re.search
? It does not belong to my class [^a-zA-Z]
.
I would like to avoid using re.sub
.