REGEXP_COUNT
Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API
Returns the number of times a regular expression pattern occurs in a string.
<string>: The string to search within.<pattern>: The regular expression pattern to count.
Returns an integer representing the number of times the pattern occurs.
- Returns
0when no matches are found. - Counts non-overlapping matches.
- For detailed regex syntax, see Regular Expression Syntax.
Count individual digits in a string.
Returns 3.
Count words in a string.
Returns 4.
Returns 0 when pattern is not found.
Returns 0.
Count occurrences of a specific pattern.
Returns 2.
Check for expected number of matches.
Returns phone numbers with exactly 10 digits.