Tracy,
As I see the link given to you by Naomi says "No reg exp please" I will assume there was no reg exp there so I show you a solution using them, if there was one in that thread accept my apologies but I did not read it.
I used the pattern that you can found here:
http://regexlib.com/DisplayPatterns.aspx?categoryId=7&cattabindex=2? isPhone("123-1234")
? isPhone("(910)222-2222")
? isPhone("(123) 456-7890")
? isPhone("(123) 456-7890 x123")
? isPhone("(123) 456-7890 x123x")
? isPhone("(123) 456-7890 x123 x123")
? isPhone("(123) 456-7890 x")
function isPhone(tcNumber 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(tcNumber)
endwith
return loResultSet.Count = 1
endfunc
[Update]
Oh.. I see I made a mistake reading the question... just a second...
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?
"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare
"To die for a religion is easier than to live it absolutely"
Jorge L. Borges