Scalar function
Returns NULL when value or pattern is NULL.
Syntax
Scalar
Arguments
Returns
- Type: BIGINT
- Possible values: A nonnegative match count, with zero when there is no match.
- NULL behavior: Returns NULL when value or pattern is NULL.
Properties
Examples
Typical behavior
Count groups of digits
Limitations
- Invalid patterns raise an execution error.
- This form takes two STRING arguments. To set supported regular-expression options, include flags in the pattern. Separate flags and start-position arguments are not available in this form.
Last modified on October 15, 2026