版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/xu187/article/details/76577505
第一种方式:
eight_date = re.compile(r"正则式")
str1 = re.search(eight_date, "文本内容").group(0)
第二种方式:
str1 = re.search(r"正则式","文本内容").group(0)
第一种方式:
eight_date = re.compile(r"正则式")
str1 = re.search(eight_date, "文本内容").group(0)
第二种方式:
str1 = re.search(r"正则式","文本内容").group(0)