>? HasAPhone([Suite 100 123-1234]) >? HasAPhone([Bldg J (910)222-2222]) > >or > >? GetThePhone([Suite 100 123-1234]) >? GetThePhone([Bldg J (910)222-2222]) > >function HasAPhone(tcString as String) as Boolean > loRegEx = Createobject('VBScript.RegExp') > with loRegEx > .Pattern = "((\(\d{3}\) ?)|(\d{3}[- \.]))?\d{3}[- \.]\d{4}(\s(x\d+)?){0,1}$" > .IgnoreCase = .T. > loResultSet = .Execute(tcString) > endwith > return loResultSet.Count = 1 >endfunc > > >function GetThePhone(tcString as String) as Boolean > loRegEx = Createobject('VBScript.RegExp') > with loRegEx > .Pattern = "((\(\d{3}\) ?)|(\d{3}[- \.]))?\d{3}[- \.]\d{4}(\s(x\d+)?){0,1}$" > .IgnoreCase = .T. > loResultSet = .Execute(tcString) > endwith > return Iif(loResultSet.Count = 0, 'No Phone', loResultSet.Item(0).Value) >endfunc >