Remou had it right. Here is the RegexContains function, so you can use it with all types of templates, not just the ones you need now.
Function RegexContains(ByVal find_in As String, _ ByVal find_what As String, _ Optional IgnoreCase As Boolean = False) As Boolean Dim RE As Object Set RE = CreateObject("vbscript.regexp") RE.Pattern = find_what RE.IgnoreCase = IgnoreCase RE.Global = True RegexContains = RE.Test(find_in) End Function
Following the example from Remou, counting cell A1, you should write:
= RegexContains (A1, "^ \ d {1,2} $")
source share