05-27-2009, 11:43 AM
Hi Try this out
Code:
vText = "20DCTNB1"
Set oRegExp = New RegExp
oRegExp.IgnoreCase = True
oRegExp.Global=False
oRegExp.Pattern="^\w{4}TN\w{2}"
Msgbox oRegExp.Test(vText)