' Collection of code snippets by Arne Vajhøj ' posted to eksperten.dk, usenet and other places (2002-now) Function RegexMatch(pattern As String, expr As String) As Boolean Dim re As RegExp Dim match As Boolean Set re = New RegExp re.pattern = pattern re.Global = True match = re.test(expr) Set re = Nothing RegexMatch = match End Function