how to format a return value by using re.sub(regx,rep1,str)?

dongdong dongdonglove8 at hotmail.com
Sat Mar 25 03:51:58 EST 2006


for example:
 re.sub('<a( [^>]+)+\s?>[^<^>]*</a>','',' asd ga<a target="_blank"
href="http://www.sine.com" class="wordstyle"> asdgasdghae rha</a>')

I wish to get the return value "asd ga asdgasdghae rha",how do do?
I have a impression on "%" and "{number}",but forgot how to use them.




More information about the Python-list mailing list