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.
--
Bináris
_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l