[2.5] Regex doesn't support MULTILINE?

Gilles Ganault nospam at nospam.com
Mon Jul 23 20:32:02 EDT 2007


On Sun, 22 Jul 2007 05:34:17 -0300, "Gabriel Genellina"
<gagsl-py2 at yahoo.com.ar> wrote:
>Try to avoid using ".*" and ".+" (even the non greedy forms); in this  
>case, I think you want the scan to stop when it reaches the ending </span>  
>or any other tag, so use: [^<]* instead.
>
>BTW, better to use a raw string to represent the pattern: pattern =  
>r"...\d+..."

Thanks everyone for the help. It did improve things significantly :-)



More information about the Python-list mailing list