39.6 FIND_LINKSファンクション

このファンクションは、テキスト内でhttpsおよびhttpのハイパーテキスト・リンクを検出します。URLの大/小文字は保持され、プロトコルは小文字で戻されます。

構文

FUNCTION FIND_LINKS (
    p_string     IN VARCHAR2,
    p_https_only IN BOOLEAN  DEFAULT FALSE )
RETURN wwv_flow_t_varchar2;

パラメータ

表39-6 FIND_LINKSファンクションのパラメータ

パラメータ 説明

p_string

入力文字列。

p_https_only

trueの場合(デフォルトはfalse)、https://リンクのみを戻します。

戻り値

このファンクションは、リンクの配列を戻します。

declare
    l_string  varchar2(32767) := 'http://oracle.com i foo.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://oracle.com',
       'http://google.com' )