re.sub() problem (regular expression)

Rick Dooling rpdooling at gmail.com
Thu Dec 13 22:52:09 EST 2007


On Dec 13, 9:00 pm, Davy <zhushe... at gmail.com> wrote:
>
> What's "\1" and the whole re.sub() mean?
>

Read about backreferences here:

http://www.regular-expressions.info/brackets.html

Also see the entry on parentheses here:

http://docs.python.org/lib/re-syntax.html

rick




More information about the Python-list mailing list