摘要:
1,贪婪和非贪婪模式重复运算符默认是贪婪的,即会进行尽可能多的匹配代码示例:>>> import re>>> emphasis_pattern = re.compile(r'''\* #beginning emphais tag --an asterisk( #begin group for capturing phrase[^\*]+ #capture anything except asterisks) #end group\* #ending emphasis tag''', re.VERBOSE)> 阅读全文
posted @ 2014-03-28 16:57
IT-tingting
阅读(859)
评论(0)
推荐(0)