New submission from Hirokazu Yamamoto <[EMAIL PROTECTED]>:
I often do same mistake again and again. Most of re module's method
takes optional argument "flags" like this.
finditer( pattern, string[, flags])
But, sub() takes optional argument "count" not "flags".
sub( pattern, repl, string[, count])
So, when I write this code, it doesn't behave like what I want.
re.sub("<[^>]+>", "", content, re.S)
I think it would be nice if the method which takes optional argument
"flags" and do same behavior with re.compile(pattern[, flags]).sub(repl,
string). Thank you.
----------
components: Regular Expressions
messages: 69087
nosy: ocean-city
severity: normal
status: open
title: [proposal] alternative for re.sub
type: feature request
_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3255>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com