REGEXP_COUNT feature introduction
Details
| Detail name | Value |
|---|---|
| Changelog Number | 27162 |
| Type | New Feature |
| Status | Resolved |
| Fix Versions | Exasol 2026.1.0, Exasol 2025.2.1 |
| Resolution Date | 2026-03-20 |
Background
Exasol provides functions to work with regular expressions: Basic Language Elements / Regular expressions.
New Feature
A new function REGEXP_COUNT was added.
This function searches for non-overlapping occurrences of a regular expression pattern in a string and returns the number of times the pattern is found. If the pattern is not present, the value 0 is returned. Otherwise, the function returns the total count of pattern matches within the string.
Example
SELECT REGEXP_COUNT('Fair fox Flew Far',
'(?i)fA'
) REGEXP_COUNT1,
REGEXP_COUNT('eeeee! said the dentist',
'e',
3
) REGEXP_COUNT2;
Result
| REGEXP_COUNT1 | REGEXP_COUNT2 |
|---|---|
| 2 | 5 |
For more details, see REGEXP_COUNT documentation in Scalar Functions (will be added when the feature is released).