Regular expressions use the following character types.
- Literal characters
- Normal text characters, such as letters or numbers, and all symbols that are not used as operators.
- Special characters
- The following symbols that can be used as operators.
* | - | [ | ] | ^ | { | } | \ | . |
To treat a special character as a literal character and not as an operator, add a preceding backslash or enclose the symbol with square brackets.
- Examples
-
- \*
- [*]