Regular expression question -- exclude substring

google at fatherfrost.com google at fatherfrost.com
Tue Nov 8 01:18:14 CET 2005


Ya, for some reason your non-greedy "?" doesn't seem to be taking.
This works:

re.sub('(.*)(00.*?01) target_mark', r'\2', your_string)




More information about the Python-list mailing list