Set regex = New RegExp regex.Global = True regex.pattern = "[0-9]+" if (regex.Test(string)) { .... }