import regex begin_pattern = regex.compile( r'(?