Skip to content

New API for REGEXP_COUNT #290

@AbelAlexJohn

Description

@AbelAlexJohn

Please extend the API to include a new scalar function REGEXP_COUNT

REGEXP_COUNT receives 3 arguments, the source string, regex pattern and optional start position which is defaulted at 1.

Example Queries

-- Returns number of occurrences of the letter 'e' in 'exasol'
SELECT REGEXP_COUNT('exasol', 'e') FROM dual; -- returns 1

-- Returns number of occurrences of the letter 'e' in 'exasol' starting from position 2
SELECT REGEXP_COUNT('exasol', 'e', 2) FROM dual; -- returns 0

-- Typical use in a table context
SELECT REGEXP_COUNT(column_name, '[0-9]' ) FROM my_table;

Capabilities

New capability

  • FN_REGEXP_COUNT

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureProduct feature

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions