|Oracle® OLAP DML Reference
11g Release 2 (11.2)
Part Number E17122-05
The function evaluates strings using characters as defined by the input character set.
When the pattern is found a NUMBER; otherwise 0.
REGEXP_INSTR (source_char, pattern[, position[, occurrence[, return_option[, match_parameter ]]]])
The text expression for which the function searches.
The text expression for which the function searches. It is usually a text literal and can contain up to 512 bytes. The function interprets a period as a wildcard character that matches any character.
A nonzero integer indicating the character of source_char where the function begins the search. When position is negative, then the function counts and searches backward from the end of string. The default value of position is
1, which means that the function begins searching at the first character of source_char.
An integer indicating which occurrence of pattern the function should search for. The value of occurrence must be positive. The default values of occurrence is
1, meaning the function searches for the first occurrence of pattern.
0 (zero) when you want the function to return the position of the first matched character (default), or
1 when you want the function to return the position of the character following the match.
A text expression that lets you change the default matching behavior of the function. You can specify one or more of the values shown in the following table.
||Treat the source string as multiple lines. The function interprets
||A newline character is among the characters matched by a period (the wildcard character). By default, it is not.|
||Ignores whitespace characters.|
The following statement
REGEXP_INSTR('Mississippi', 'i', 1, 3)
searches the string Mississippi for the third instance of the letter i, beginning the search at the first letter. It returns the value 8.