立即学习:https://edu.csdn.net/course/play/26755/340146?utm_source=blogtoedu
search函数:
s1 = re.search("1\d{10}", "18612345678")
if s1 is not None:
print(s1.group())
print(s1.start())
print(s1.end())
"""结果:
18612345678
7
18 """
立即学习:https://edu.csdn.net/course/play/26755/340146?utm_source=blogtoedu
search函数:
s1 = re.search("1\d{10}", "18612345678")
if s1 is not None:
print(s1.group())
print(s1.start())
print(s1.end())
"""结果:
18612345678
7
18 """