REGEXP_MATCH_COUNT scalar function

The REGEXP_MATCH_COUNT scalar function returns a count of the number of times that a regular expression pattern is matched in a string.

Read syntax diagramSkip visual syntax diagramREGEXP_MATCH_COUNT(source-string ,pattern-expression ,start ,flags ,CODEUNITS32,CODEUNITS16OCTETS )

The schema is SYSIBM.

The REGEXP_MATCH_COUNT scalar function is a synonym for the REGEXP_COUNT scalar function.

Notes

  • The regular expression processing is done by using the International Components for Unicode (ICU) regular expression interface.
  • Considerations for non-Unicode databases:
    • A regular expression pattern supports only halfwidth control characters; use a character string data type for the pattern expression argument. A character string data type can be used for the pattern expression argument even when a graphic string data type is used for the source string argument.
    • The source string argument must be a graphic string data type if the pattern expression argument is a graphic string data type.
    • The source string and replacement string arguments must both be character string data types or both be graphic string data types.