CREATE OR REPLACE FUNCTION no_html (p_string IN CLOB) RETURN CLOB AS
v_string_in CLOB := p_string;
v_string_out CLOB;
BEGIN
WHILE INSTR (v_string_in, ‘>’) > 0 LOOP
v_string_out := v_string_out
|| SUBSTR (v_string_in, 1, INSTR (v_string_in, ‘<’) – 1);
v_string_in := SUBSTR (v_string_in, INSTR (v_string_in, ‘>’) + 1);
END LOOP;
v_string_out := v_string_out || v_string_in;
RETURN v_string_out;
END no_html;
No comments:
Post a Comment