Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> OWA_PATTERN to remove any html

OWA_PATTERN to remove any html

From: Ingo <fhwi93ra_at_gmx.de>
Date: Wed, 23 Apr 2003 09:25:24 +0200
Message-ID: <b85f6n$5g65h$1@ID-138524.news.dfncis.de>


Hi all,

I'm trying to express a regular expression to remove any html in a given varchar2 variable. I've found the regular expression to do this in perl. It's:

$OnlyContent =~ s{<([^>])+>|&([^;])+;}{}gsx;

When I try to use this regular expression in PL/SQL I get the command:

L_source := '<html><body><b>test</b><a
href="http://www.test.com">something</a></body></html>'; L_count := OWA_PATTERN.CHANGE(L_source, '<([^>])+>|&([^;])+;', '', 'gi');

Every time I try to execute this, I get the following errors: ORA-06502: PL/SQL: numeric or value error: character to number conversion error

ORA-06512: at "SYS.OWA_PATTERN", line 444
ORA-06512: at "SYS.OWA_PATTERN", line 579
ORA-06512: at "SYS.OWA_PATTERN", line 1120

Could anybody tell me, what's wrong with the regular expression or how I could express a regular expression which removes any html in a given varchar2???

Thx!!

Best regards,
Ingo. Received on Wed Apr 23 2003 - 02:25:24 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US