Skip to main content
Skip table of contents

Regular Expressions

The Designer uses the ICU's Regular Expressions package to compute regular expressions.

The pages below are listing the supported characters:

Regular Expressions and Action Script

The character \ (backslash) has a special meaning for strings and regular expressions of the Action Script language of the Designer. In action script strings, backslash is used to escape single quotes, double quotes and itself. In REs, it is used to escape special characters and also itself.
This double function of backslashes leads to three exceptions from the intuitive usage of backslashes if action script literals are used to define a RE pattern that contains the same escape sequences as used in EAL literals.

The exceptions are:

Regular Expression

Action Script Literal

\ \

\ \ \ \

\"

\ \ \ "

\'

\ \ \ '

In all other cases, the action script literal equals the regular expression.

Example

The following action script statement replaces all occurrences of  \ by x. To match a \ in a regular expression, we need the expression \\. If we use an action script literal to provide the regular expression, we need to escape each backslash again, ending up with:

NONE
set changed = aString.replace("\\\\", "x");

Related Documentation:

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.