BinĂ¡ris <wikiposta(a)gmail.com>om>:
Try this first in replacements:
ur'(?m)^== *([a-zA-Z ]+) *==\n+ etc.
m for multiline (sometimes ?s works instead, I just use it without
understanding why), and space* in case there are spaces between == marks.
Sorawee Porncharoenwase <nullzero.free(a)gmail.com>om>:
@Michael Hamm: Beside BinĂ¡ris's suggestion,
re.escape should be used only
on pattern parameter, not replacing text; use match.group(1) instead of
re.escape(match.group(1))
Thank you both very much. Probably (I won't be able to test it until
later today) these were the problem -- or part of it.
Michael Hamm