Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> OWA_PATTERN to remove any html
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
![]() |
![]() |