I\'m searching a file line by line for the occurrence of ##random_string##. It works except for the case of multiple #...
pattern=\'##(.*?)##\' prog=re.compile(p
have you considered doing it non-regex way?
>>> string='lala ####hey## there' >>> string.split("####")[1].split("#")[0] 'hey'