1、进入excel界面,将电话放在第一列,A1写上题目或空白。

3、输入公式“Sub 提取手机号码() arr = Range("a2:a" & Range("a65536").E荏鱿胫协nd(3).Row) Set reg = CreateObject("vbscript.regexp") reg.Pattern = "1[34578]\d{9}(?=\D|1[34578]\d{9}|$)" reg.Global = True For i = 1 To UBound(arr, 1) s = arr(i, 1) If reg.test(s) Then Set mymatch = reg.Execute(s) m = 2 For Each mat In mymatch Cells(i + 1, m) = mat m = m + 1 Next End If Next i End Sub”。

5、总结如下。
