python里使用正则表达式的组嵌套实例详解
由于组本身是一个完整的正则表达式,所以可以将组嵌套在其他组中,以构建更复杂的表达式。下面的例子,就是进行组嵌套的例子:
#python 3.6
#蔡军生
#http://blog.csdn.net/caimouse/article/details/51749579
#
import re
def test_patterns(text, patterns):
"""Given source text and a list of patterns, look for
matches for each pattern within the