re module import python code example Example: re module documentation >>> m = re.search(r'(?<=-)\w+', 'spam-egg') >>> m.group(0) 'egg'