Regex Reference
Reference for regular expressions used in StackQL.
See also:
[REGEXP_LIKE] [REGEXP_SUBSTR] [REGEXP_REPLACE]
Supported syntax
The following regular expression syntax is supported in StackQL:
| Expression | Description |
|---|---|
X* | zero or more occurrences of X |
X+ | one or more occurrences of X |
X? | zero or one occurrences of X |
(X) | match X |
X|Y | X or Y |
^X | X occurring at the beginning of the string |
X$ | X occurring at the end of the string |
. | Match any single character |
\c | Character c where c is one of \{}()[]|*+?. |
\c | C-language escapes for c in afnrtv. ex: \t or \n |
[abc] | Any single character from the set abc |
[^abc] | Any single character not in the set abc |
[a-z] | Any single character in the range a-z |
[^a-z] | Any single character not in the range a-z |
For more information, see https://github.com/nalgeon/sqlean/blob/main/docs/re.md