greenServeFEgreenServeFE

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

ExportRole
matchmatch exported function or value
testtest exported function or value
replace_firstreplace 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.

Related references

Module catalog · Native ABI · GSVE language