regsub backreference question

Michael Esveldt dante at oz.net
Wed Apr 26 22:43:19 EDT 2000


I'm trying to figure out how back referencing works in python's regsub 
module. I thought the following code would simply double the string 
"foo" but it's just returning "foo".

regsub.sub(r"(.*)", r"\1\1", "foo")

What am I doing wrong here?

thanks in advance,
Michael
_______________________________________________________________
dante at oz.net - Michael Esveldt - #FightThePower on Openprojects



More information about the Python-list mailing list