Documentation home / Native Module API
Native Module API
Regular Expression API
Pattern matching, boolean tests and first-match replacement.
Purpose
Pattern matching, boolean tests and first-match replacement.
Exports registered by the module initializer
| Export | Role |
|---|---|
match | match exported function or value |
test | test exported function or value |
replace_first | replace first exported function or value |
Usage example
import gs_regex;
print(gs_regex.test("order-2048", "^order-[0-9]+$"));
print(gs_regex.replace_first("green green", "green", "blue"));Pattern syntax and escaping follow the platform regular-expression implementation.
greenServeFE