摘要: 实例在python2.6中测试通过,对python3.1需要相应的修改。将下面字符串中的目录替换为新的目录c:\test\2011 或c:\test\2012。 Hellodir=c:\test\2010How are you!一 使用Regex Match Tester来测试,如下:二 代码示例 importreoldline='dir=c:\\test\\2010'str1='Hello\n'+oldline+'\nHowareyou!'printstr1print'---------------------------------- 阅读全文
posted @ 2011-07-06 09:43 iTech 阅读(3632) 评论(0) 推荐(0) 编辑