Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用正则表达式在 oracle 中提取字符串的以下部分:
String: FN_SUM(ACCRUED_INTEREST) Output expected: ACCRUED_INTEREST
我试过 :
select regexp_substr('FN_SUM(ACCRUED_INTEREST)','([^)]') from dual;
这给了我 ORA-12725 错误。
任何使用正则表达式的解决方案都将不胜感激。
尝试:
select regexp_replace('FN_SUM(ACCRUED_INTEREST)', '(.*)?\((.*)?\)(.*)?$','\2') from dual;
为什么不使用常规替换
select replace( replace('fn_sum(value)' , substr('fn_sum(value)', 1, instr('fn_sum(value)', '('))) , ')') from dual