python 正則

#!/usr/bin/python # -*- coding: utf-8 -*- import re re.match 嘗試從字符串的起始位置匹配一個模式,如果不是起始位置匹配成功的話,match()就返回none。 函數語法: re.match(pattern, string, flags=0) ------- re.search 掃描整個字符串並返回第一個成功的匹配。 a='23478178
相關文章
相關標籤/搜索