REGEXP_EXTRACT

    String functions

    Syntax

    REGEXP_EXTRACT( string, pattern )
    

    Description

    Returns the substring string that matches the regular expression pattern pattern.

    Argument types:

    • stringString
    • patternString

    Return type: String

    Note

    Only constant values are accepted for arguments (pattern).

    Note

    See the documentation of the data source to clarify the regular expression syntax.

    Use the ClickHouse syntax to create regular expressions in materialized datasets.

    Examples

    REGEXP_EXTRACT("RU 912873", "[A-Z]+\s+(\d+)") = "912873"
    

    Data source support

    Materialized Dataset, ClickHouse 1.1, MySQL 8.0.12, PostgreSQL 9.3.