Folks, this needs some advertising. IE 5 comes with a COM component (microsoft VBScript regular expressions) that allows you to use regular expressions in VB!
I have been dealing with workarounds for this missing feature in VB since version 3.

how to use it

private Sub Command1_Click()
Dim r as new RegExp
r.Pattern = "\([0-9]{3}\)[0-9]+"
MsgBox r.Test(Text1.Text) ' pops up true or false
End Sub



this code checks text1 for a valid American phone number, e.g. (513)1234 (if that's the correct format).
This opens up a whole new bunch of cool tricks for input validation!