Skip to main content

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:

ExpressionDescription
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|YX or Y
^XX occurring at the beginning of the string
X$X occurring at the end of the string
.Match any single character
\cCharacter c where c is one of \{}()[]|*+?.
\cC-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