D toc |
---|
D s product | ||
---|---|---|
|
Slashes
The forward slash character is used to denote the boundaries of the regular expression:
Code Block |
---|
/this_is_my_regular_expression/ |
- The backslash character (
\
) is the escaping character. It can be used to denote an escaped character, a string, literal, or one of the set of supported special characters. - Use a double backslash (
\\
) to denote an escaped string literal. For more information, see Escaping Strings in Transformations.
Supported Special RegEx Characters
The table below identifies the special characters that are supported in the platform.
Special Characters | Description | ||
---|---|---|---|
\\ | String literal match for \ character. | ||
| Matches any zero-width word boundary, such as between a letter and a space. Example: | ||
\B | Matches any zero-width non-word boundary, such as between two letters or two spaces. Example: | ||
\cX | Matches a control character (CTRL + A-Z ), where X is the corresponding letter in the alphabet. | ||
\d | Matches any digit. | ||
\D | Matches any non-digit. | ||
\f | Matches a form feed. | ||
\n | Matches a line feed.
| ||
\r | Matches a carriage return. | ||
\s | Matches any whitespace character. These characters include:
| ||
\S | Matches any character that is not one of the supported whitespace characters. | ||
\t | Matches a horizontal tab.
| ||
\v | Matches a vertical tab. | ||
\w | Matches any alphanumeric value, including the underscore.
| ||
\W | Matches any non-alphanumeric character, including the underscore. | ||
\xHH | Matches the ASCII character code as expressed by the hexadecimal value HH . | ||
\uHHHH | Matches the Unicode character code as expressed by the hexadecimal value HHHH . |
Required Escaped Characters
The following characters have special meaning within a regular expression.
Code Block |
---|
. ^ $ * + - ? ( ) [ ] { } \ | — / |
To reference the literal character, you must escape it within the regular expression, as in:
Code Block |
---|
/\./ |
D s also | ||||
---|---|---|---|---|
|