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 -> Re: strip HTML tags from fields?

Re: strip HTML tags from fields?

From: Vladimir M. Zakharychev <vladimir.zakharychev_at_gmail.com>
Date: Thu, 09 Aug 2007 11:12:50 -0700
Message-ID: <1186683170.013546.326280@r34g2000hsd.googlegroups.com>


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

Original text of this message

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