Syntax
Parameters
-
str: The string to search in. Supported data type is VARCHAR. If the input is NULL, NULL is returned. -
pattern: The regular expression pattern to search for. Supported data type is VARCHAR. If the pattern is NULL, NULL is returned.
Return value
Returns an INT representing the count of occurrences. Returns 0 if no matches are found or if the input string is empty.Examples
Tip This example uses the Local Climatological Data(LCD) dataset featured in the the database Basics Quick Start. You can load the data and try the example yourself.