'引用Microsoft VBScript Regular Expressions 5.5
Dim strPhone As String
Dim regEx As RegExp
Dim Match, Matches ' Create variable.
strPhone = "(024)-23899087(电话) (024)23987676 23339900(传真) "
Set regEx = New RegExp ' Create a regular expression.
regEx.Pattern = "\d{3,8}"
regEx.Global = True
If regEx.Test(strPhone) Then
Set Matches = regEx.Execute(strPhone)
For Each Match In Matches
MsgBox Match.Value
Next
End If
rs.Addnew
n = 1
For i = 0 To UBound(sFields)
If Len(sField(i)) = 3 Then
rs!area = sField(i)
Else
rs.Fields("phone" & n) = sField(i)
n = n + 1
End If
Next i
rs.Update