re.sub does not replace all occurences

2007-08-07 Thread Christoph Krammer
Hello everybody, I wanted to use re.sub to strip all HTML tags out of a given string. I learned that there are better ways to do this without the re module, but I would like to know why my code is not working. I use the following: def stripHtml(source): source = re.sub([\n\r\f], , source)

Re: re.sub does not replace all occurences

2007-08-07 Thread Marc 'BlackJack' Rintsch
On Tue, 07 Aug 2007 10:28:24 -0700, Christoph Krammer wrote: Hello everybody, I wanted to use re.sub to strip all HTML tags out of a given string. I learned that there are better ways to do this without the re module, but I would like to know why my code is not working. I use the

Re: re.sub does not replace all occurences

2007-08-07 Thread Neil Cerutti
On 2007-08-07, Christoph Krammer [EMAIL PROTECTED] wrote: Hello everybody, I wanted to use re.sub to strip all HTML tags out of a given string. I learned that there are better ways to do this without the re module, but I would like to know why my code is not working. I use the following:

Re: re.sub does not replace all occurences

2007-08-07 Thread Christoph Krammer
Neil Cerutti schrieb: In other words, the fourth argument to sub is count, not a set of re flags. I knew it had to be something very stupid. Thanks a lot. -- http://mail.python.org/mailman/listinfo/python-list