<div class="gmail_quote">On Mon, Apr 23, 2012 at 4:41 PM, Andrea Spadaccini <span dir="ltr"><<a href="mailto:a.spadaccini@catania.linux.it">a.spadaccini@catania.linux.it</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Ciao,<br>
<br>
[cut]<br>
<div class="im"><br>
> result = re.sub(r"(?m)(>\n+|\t|\r|\s+\?<)|(<!--.*?-->)", "", text)<br>
<br>
</div>Ecco cosa potrebbe accadere se fai il parsing di documenti HTML con le regex:<br>
<a href="http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454" target="_blank">http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454</a></blockquote>

<div><br></div><div>Oppure questo:</div><div><a href="http://stacktrace.it/2007/11/29/ce-sempre-leccezione-alla-regular/">http://stacktrace.it/2007/11/29/ce-sempre-leccezione-alla-regular/</a></div><div><br></div><div>:-)</div>

<div><br></div></div>-- <br><div><div><div><div><a href="http://beri.it/" target="_blank">http://beri.it/</a> - Un blog</div><div><a href="http://beri.it/i-miei-libri/" target="_blank">http://beri.it/i-miei-libri/</a> - Qualche libro</div>

<div><br></div></div></div></div><br>