Hi!
In the case below:
create table t1 ( regex varchar2(100), flag char(1));
insert into t1 values('foo','1');
insert into t1 values('bar','1');
insert into t1 values('ba(z','0');
select * from t1 where regexp_like('foo', regex, 'i');
drop table t1;
It returns the error:
ORA-12725: unmatched parentheses in regular expression
Even when specifying an additional condition, like: select * from t1 where regexp_like('foo', regex, 'i') and flag='1';
the same error is returned (not always, it seems to depend on the chosen plan)
The question: How to skip rows that have "broken" regex?
In other words, how to make regexp_like return false instead of error for those cases?
Define and use some custom wrapper function?
PS: I'm using DB version 11.2.0.4