39.5 FIND_IDENTIFIERS Function

Given an identifiers prefix, this function finds the identifiers including consecutive numbers following. The search is case insensitive and also ignores white space and special characters.

Syntax

FUNCTION FIND_IDENTIFIERS (
    p_string IN VARCHAR2,
    p_prefix IN VARCHAR2 )
    RETURN wwv_flow_t_varchar2;

Parameters

Table 39-5 FIND_IDENTIFIERS Function Parameters

Parameter Description

p_string

The input string.

p_prefix

The identifer prefix.

Returns

Returns an array of identifers present in a string.

Example

declare
    l_string  varchar2(32767) :=
    'ORA-02291: integrity constraint (A.B.C) violated - parent key not found '||
    'SR # 3-17627996921 bug: 23423 feature 100022 and feature: 1000001 rptno=28487031 sr# 1111111,  '||
    ' i have filed bug 27911887.';
    l_results apex_t_varchar2;
begin
    l_results := apex_string_util.find_identifiers(l_string,'ORA-',true);
    l_results := apex_string_util.find_identifiers(l_string,'sr ',true);
    l_results := apex_string_util.find_identifiers(l_string,'feature ',true);
    l_results := apex_string_util.find_identifiers(l_string,'bug ',true);
    l_results := apex_string_util.find_identifiers(l_string,'rptno=',true);
end;
/
-> apex_t_varchar2('ORA-02291')
-> apex_t_varchar2('SR 3-17627996921','SR 1111111')
-> apex_t_varchar2('FEATURE 100022','FEATURE 1000001')
-> apex_t_varchar2('BUG 23423','BUG 27911887')
-> apex_t_varchar2('RPTNO=28487031')