View Single Post
  #2 (permalink)  
Old July 25th, 2004, 08:24 AM
bmains bmains is offline
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

You can use Regular expressions

dim objRegx
set objRegx = Ne RegExp
objRegx.pattern = "(1-)?\d{3,}-\d{3,}-\d{4,}"

if (objRegx.test(honotice.txthomephone.value)) then
    'Phone OK
else
    'Phone not OK
end if

Something like that. Regular expressions are pretty powerful, and are definitely very helpful.

Brian
Reply With Quote