Equivalent to oracle patindex and instr functions with wild card symbols

is there an oracle equivalent patindex? from my search, the only function close to patindexis the oracle function instr, but it does not support wild card.

what is the oracle equivalent of the following query?

select patindex('%[^0]%','00194505022') 

edit: I found out that it regexp_instrhas a similar function patindex.

+3
source share
1 answer

Here's regexp_instr, which uses standard regex syntax to match patterns.

select regexp_instr('00194505022','[^0].*') from dual;
+6
source

Source: https://habr.com/ru/post/1744057/


All Articles