56.6 FIND_LINKS Function
This function finds https
and http
hypertext links within text. The URL is preserved and the protocol is returned in lower case.
Syntax
APEX_STRING_UTIL.FIND_LINKS (
p_string IN VARCHAR2,
p_https_only IN BOOLEAN DEFAULT FALSE )
RETURN apex_t_varchar2;
Parameters
Parameter | Description |
---|---|
p_string |
The input string. |
p_https_only |
Default If |
Returns
This function returns an array of links.
Example
DECLARE
l_string varchar2(32767) := 'http://example.com i website.com like https://carbuzz.com '||
'and <a href="https://dpreview.com"> and http://google.com';
l_results apex_t_varchar2;
BEGIN
l_results := apex_string_util.find_links(l_string,false);
END;
/
-> apex_t_string (
'https://carbuzz.com',
'https://dpreview.com',
'http://google.com' )
Parent topic: APEX_STRING_UTIL