Page History
Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Div | ||
---|---|---|
| ||
|
The
...
Bridge uses the ICU's Regular Expressions package to compute regular expressions.
This appendix is divided into three parts:
Children Display |
---|
...
Info | ||
---|---|---|
| ||
The character |
...
Bridge Action Language) strings and regular expressions (RE). In EAL strings, it 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 EAL literals are used to define a RE pattern that contains the same escape sequences as used in EAL literals. The exceptions are:
|
In all other cases, the EAL literal equals the RE.
For example, the following EAL statement replaces all occurrences of \ by x. To match a \ in a RE we need the expression \ \. If we use an EAL literal, we need to escape each backslash again, getting:
Code Block | ||
---|---|---|
| ||
set changed = aString.replace("\\\\", "x"); |
Panel | ||
---|---|---|
| ||