Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Referencing REGEXP_REPLACE capture in other function

Fordo82Jul 25 2007 — edited Jul 26 2007
Here's the deal...
I've got a clob that I'm scrubbing with REGEXP_REPLACE to remove the instance of a specific string, then I want to use that string in a function call. I can see the string (on line 2 below) but can't get the function in line 3 to utilize it.

THE CODE
1 SELECT regexp_replace(wrk_clob, 'href=\s*"([^"]+)"',
2 || '\1' || ':'
3 || get_id_list(in_table, in_state, '\1')
4 INTO wrk_clob
5 FROM dual;

THE FUNCTION SPEC
FUNCTION get_id_list(
in_table VARCHAR2,
in_state VARCHAR2,
in_doc_name VARCHAR2)
RETURN VARCHAR;

If I hardcode the value from line 4 into the in_doc_name position it returns properly. However, it does nothing - because '\1' does not point to any data - with this reference.

Any ideas where to go with this?
Thanks.
fordo82
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 23 2007
Added on Jul 25 2007
4 comments
609 views