Ciao,

[cut]

> result = re.sub(r"(?m)(>\n+|\t|\r|\s+\?<)|(<!--.*?-->)", "", text)

Ecco cosa potrebbe accadere se fai il parsing di documenti HTML con le regex:
http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454

:)

Andrea
_______________________________________________
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python

Rispondere a