Duncan Booth <[EMAIL PROTECTED]> wrote:
>Although I generally advise against overuse of regular expressions, this is
>one situation where regular expressions might be useful: [ ... ]
>>>> nobr = re.compile('\W*<br.*?>\W*', re.I)
Agreed (on both counts), but r'\s*<br.*?>\s*' might be better
(consider what happens with "an unfortunate... <br> in the middle"
if you use \W rather than \s).
--
\S -- [EMAIL PROTECTED] -- http://www.chaos.org.uk/~sion/
___ | "Frankly I have no feelings towards penguins one way or the other"
\X/ | -- Arthur C. Clarke
her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump
--
http://mail.python.org/mailman/listinfo/python-list