REGEXTEST Function

The REGEXTEST function returns the boolean True or False depending if the regular expression matches any part of a text string.


VBA > Regular Expressions


Square Brackets

A set of characters enclosed in square brackets [] matches any one of the characters inside.

[aeiou] matches any vowel. 

How Many

These characters are used to specify how many

a* matches zero or more as 
a+ matches one or more as
a{3} matches exactly three as.

Escape Character

This provides a way to handle special characters as literals.

\. matches a literal period. 

Grouping Characters

Group - A part of a regex pattern enclosed in parentheses () that can be referred to later. For example, (abc) matches the exact sequence abc.


Pipe Character

The pipe | character used to match one thing or another.

aa|bb matches "aa" or "bb" 

String Position ^

This special character matches the start of a string

^ matches the start of a string, 

String Position $

This special character matches the end of a string

$ matches the end of a string. 

Full Stop

The full stop . character, matches any single character except a newline character.

d.g matches dog, dug, dig 


© 2025 Better Solutions Limited. All Rights Reserved. © 2025 Better Solutions Limited TopPrevNext