45.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 apex_t_varchar2;
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-');
l_results := apex_string_util.find_identifiers(l_string,'sr ');
l_results := apex_string_util.find_identifiers(l_string,'feature ');
l_results := apex_string_util.find_identifiers(l_string,'bug ');
l_results := apex_string_util.find_identifiers(l_string,'rptno=');
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')
Parent topic: APEX_STRING_UTIL