python中使用正则表达式替换

newresult=regecommpile.subn(newstr,subject)

返回的是一个元组,一般取第一个,即为newresult[0]

posted @ 2011-08-12 19:19  rorshach  阅读(275)  评论(0编辑  收藏  举报