Regular Expressions
Function | Description | Meta |
---|---|---|
regex.find_all_string_submatch_n |
Returns all successive matches of the expression. Arguments: Returns:pattern (string)regular expression value (string)string to match number (number)number of matches to return; output (array[array[string]])array of all matches | Wasm |
regex.find_n |
Returns the specified number of matches when matching the input against the pattern. Arguments: Returns:pattern (string)regular expression value (string)string to match number (number)number of matches to return, if output (array[string])collected matches | SDK-dependent |
regex.globs_match |
Checks if the intersection of two glob-style regular expressions matches a non-empty set of non-empty strings.
The set of regex symbols is limited for this builtin: only Arguments: Returns:glob1 (string)first glob-style regular expression glob2 (string)second glob-style regular expression result (boolean)true if the intersection of | SDK-dependent |
regex.is_valid |
Checks if a string is a valid regular expression: the detailed syntax for patterns is defined by https://github.com/google/re2/wiki/Syntax. Arguments: Returns:pattern (string)regular expression result (boolean)true if | v0.23.0 Wasm |
regex.match |
Matches a string against a regular expression. Arguments: Returns:pattern (string)regular expression value (string)value to match against result (boolean)true if | v0.23.0 Wasm |
regex.replace |
Find and replaces the text using the regular expression pattern. Arguments: Returns:s (string)string being processed pattern (string)regex pattern to be applied value (string)regex value output (string)string with replaced substrings | v0.45.0 SDK-dependent |
regex.split |
Splits the input string by the occurrences of the given pattern. Arguments: Returns:pattern (string)regular expression value (string)string to match output (array[string])the parts obtained by splitting | SDK-dependent |
regex.template_match |
Matches a string against a pattern, where there pattern may be glob-like Arguments: Returns:template (string)template expression containing value (string)string to match delimiter_start (string)start delimiter of the regular expression in delimiter_end (string)end delimiter of the regular expression in result (boolean)true if | SDK-dependent |