【发布时间】:2021-06-19 19:34:34
【问题描述】:
我尝试了来自here 的多个正则表达式,但它们都不能正常工作。示例:
declare
v_result integer;
v_link nvarchar2(300) := 'http://example.com/blah_blah/';
v_regexp nvarchar2(300) := '@^(https?|ftp)://[^\s/$.?#].[^\s]*$@iS';
begin
begin
select 1 into v_result
from dual
where regexp_like(v_link, v_regexp);
exception when no_data_found then
dbms_output.put_line('false');
return;
end;
dbms_output.put_line('true');
end;
这将返回 false,尽管它应该返回 true。为什么?
【问题讨论】:
-
这些正则表达式都不会在 Oracle 中工作,因为它们不使用与 Oracle 相同的正则表达式语法。