Skip to content

Latest commit

 

History

History
13 lines (10 loc) · 179 Bytes

File metadata and controls

13 lines (10 loc) · 179 Bytes

regex

import re

re.match(r'^[aeiou]', str)
re.sub(r'^[aeiou]', '?', str)
re.sub(r'(xyz)', r'\1', str)

expr = re.compile(r'^...$')
expr.match(...)
expr.sub(...)