Have you tried the UDF above?

Quote Originally Posted by xld
Don't quote me, check it yourself, but I think that VBScript 5.5 introduced look-ahead!
Unfortunately not

From http://aspnet.4guysfromrolla.com/articles/022603-1.aspx

Lookaround is a feature that is partially implemented in JScript but not in VBScript. There are two directions of lookaround - lookahead and lookbehind - and two flavors of each direction - positive assertion and negative assertion. The syntax for each is:

(?=...) - Positive lookAHEAD
(?!...) - Negative lookAHEAD
(?<=...) - Positive lookBEHIND
(?<!...) - Negative lookBEHIND

Cheers

Dave