RegExpr flags

Back to help contents

The RegExpr function has an optional Flags parameter. The possible values for Flags are:

reCaseSensitiveDefault. Matches are case sensitive (a and A are different).
reCaseInSensitive

Matches are not case sensitive (a and A are the same).

reSingleLineTreats the input as a single line. "." matches a newline, "^" matches only at end of string, and "$" matches only at beginning of string.
reMultilineTreats the input as multiple lines. "." doesn't match a newline, "^" matches at end of string or line, and "$" matches at beginning of string or line.
Default = neitherThe default is neither reSingleLine or reMultiline, but a combination of them. "." doesn't match a newline, "^" matches only at end of string, and "$" matches only at beginning of string.

You can combine Flags with the plus (+) operator like this: reCaseInSensitive + reSingleLine.

VB functions in RegExpr

©Aivosto Oy