Pattern: Regex metacharacter

“Regex metacharacter” is one of the patterns that you can select on the Match panel. This pattern matches a character that has a special meaning in a regular expression or in a character class in a regular expression. Such characters need to be escaped if you want the regex or character class to match them literally. With this pattern you can generate a regex that finds such characters in user input, which you can use to escape those characters before using them in a regular expression.

Regular Expression Flavor

Turn on to select a specific regular expression flavor to determine which characters are metacharacters in regular expressions.
Turn off to use the regex flavor of the application selected on the Regex panel to determine which characters are metacharacters in regular expressions.

Regular Expression Flavor

Select the regular expression flavor that determines which characters are metacharacters in regular expressions.

Character Classes

Turn on to match any character that is a metacharacter inside character classes.
Turn off to match any character that is a metacharacter outside character classes.

Free-Spacing

Turn on to also match those whitespace characters that the regex flavor ignores in free-spacing mode. This has no effect if the regex flavor does not support free-spacing mode at all. It also has no effect if you choose to match characters that are metacharacters inside character classes and the regex flavor does not (have an option to) apply free-spacing mode to character classes.
Turn off to not treat any whitespace characters as metacharacters.

Examples