Table Of Contents

regex_i

Version:
    Last Modified: March 15, 2017

    Performs a case-insensitive search for a regular expression in the input string a and returns the first and last indexes of the matched strings.

    Syntax

    m = regex_i(a, format)
    m = regex_i(a, format, 'once')
    [m, n] = regex_i(a, format)
    [m, n] = regex_i(a, format, 'once')
    Legacy name: regexpi

    Inputs

    a

    String to search.

    format

    Pattern for which you want to search in a. format is case insensitive.

    'once'

    Directs MathScript to return the first and last indexes of only the first matched string.

    Outputs

    m

    First indexes of all matched strings. If you specify 'once', m returns the first index of the first matched string.

    n

    Last indexes of all matched strings. If you specify 'once', n returns the last index of the first matched string.

    a = 'Run regex_i in MathScript';
    format = 'M[a-z]+t';
    [m, n] = regex_i(a, format)

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices


    Recently Viewed Topics