Referencing REGEXP_REPLACE capture in other function
Fordo82Jul 25 2007 — edited Jul 26 2007Here'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