On Aug 1, 2010, at 2:54 AM, mdipierro wrote: > I realized there was a bug in rewrite that prevented $1, $2, etc from > working. Please check if this is now fixed in trunk.
A very minor redundancy:
regex_at = re.compile('(?<!\\\\)\$[a-zA-Z][\w_]*')
is equivalent to:
regex_at = re.compile('(?<!\\\\)\$[a-zA-Z]\w*')
That is, \w matches underscore.
Would this be more readable with a raw string? I think so.
regex_at = re.compile(r'(?<!\\)\$[a-zA-Z]\w*')

