regexp
vertigo
spam at spam.pl
Tue Dec 19 16:39:18 EST 2006
Hello
Thanx for help, i have one more question:
i noticed that while matching regexp python tries to match as wide as it's
possible,
for example:
re.sub("<!--.*-->","",htmldata)
would cut out everything before first "<!--" and last "-->" in the
document.
Can i force re to math as narrow as possible ?
(to match first "<!--" with the first "-->" after the "<!--" and to repeat
this procedure while mentioned pattern is still found) ?
Thanx
More information about the Python-list
mailing list