REGEXP_SUBSTR - Extracting a Substring Matching a RegExp from a String

  • Last update: June 03, 2025
  • Overview

    iconNote:
    FineDataLink of V4.1.11.3 and later versions supports the function.
    Syntax

    REGEXP_SUBSTR(String, Regular expression, Starting position, Occurrence number, Mode)

    Extracts a substring matching the Regular expression from the String.

    Parameters

    String (text)

    The string you want to process


    Regular expression (text)

    The regular expression you write


    Starting position (numeric)

    The position where the matching starts. It is optional and defaults to 1.


    Occurrence numberSpecifies the match you want to extract when the string has multiple matches. It is optional and defaults to 1.

    Mode (text)

    The matching mode. You can use one or multiple values listed below that represent different matching modes. If Mode contains contradictory values, the function uses the last value.

    • c: case-sensitive matching

    • i: case-insensitive matching

    • m: multi-line matching

    • n: The dot (.) can match line endings.

    • u: Only UNIX line endings are matched.

    Return Value Type

     

    String

    Example

    For example, add a New Calculation Column operator in the Data Transformation node and input the formula REGEXP_SUBSTR ('aaa123fafaf' ,'[0-9]+'). The function returns 123 in the new column, as shown in the following figure.

    附件列表


    主题: Data Development - Scheduled Task
    Previous
    Next
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy