INFO: How to use Regular Expressions with VB6
We can use the same regular expression object VBScript has access to. Set a reference to "Microsoft VBScript Regular Expressions 5.5" (or 1.0). For those that have never used them, they are based on concepts from the Perl langauge and can blow VB's InStr, Replace, etc functions away when it comes to searching and replacing text.
VB Code:
Dim re As VBScript_RegExp_55.RegExp
Set re = New RegExp
re.Pattern = "^\d{2,3}$"
Debug.Print re.Test("99")
Debug.Print re.Test("123")
Debug.Print re.Test("1234")
Debug.Print re.Test("abc")
Set re = Nothing