Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: strip HTML tags from fields?
On Aug 9, 7:43 pm, the matt <m..._at_kettlewell.net> wrote:
> Hello,
>
> Does anyone have an easy inline REGEXP_REPLACE() (or equivalent) that
> will strip out unwanted HTML tags?
>
> I've been trying the following variation, but I suspect that I'm on
> the wrong path.
>
> SELECT
> regexp_replace (name , '(<.*>).*(<.*>).*(<.*>)' , '\1 \2 \3 ')
> FROM ...
>
> Thanks
>
> Matt
See CTX_DOC.POLICY_FILTER procedure specification and description in Oracle Text Reference for the easiest way to convert HTML to plain text in Oracle 10g. Note that it's a procedure, not a function, so you may have to write a wrapper function of your own to be able to use it in SQL, and it requires Oracle Text to be installed.
Regards,
Vladimir M. Zakharychev
N-Networks, makers of Dynamic PSP(tm)
http://www.dynamicpsp.com
Received on Thu Aug 09 2007 - 13:12:50 CDT
![]() |
![]() |