Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

[GENERAL] [Urgent] Regexp_replace question

From: Phoenix Kiula <phoenix.kiula(at)gmail.com>
Date: Tue Sep 25 2007 - 01:36:26 EDT


Hi,

How can I remove characters that form a part of regular expressions? I would like to remove all instances of the following characters:

[
]
\
+

Given that these all mean something in regexp, I am trying to prefix them with a backslash, but it doesn't work. I tried the following:

    update TABLE
    set COLUMN = regexp_replace(COLUMN, E'[\\\[\]\+]+', '')
;

This did not work so I tried the naked characters separated by a pipe, as follows:

    update TABLE
    set COLUMN= regexp_replace(COLUMN, E'[\|[|]|+]+', '')
;

But this of course did not work either. I've read and re-read the pattern matching doc page ( http://snipurl.com/pg_regexp ) but it doesn't seem to offer much help.

Do you need help?X

Any thoughts on what I am doing wrong?

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster Received on Tue Sep 25 01:40:32 2007

This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 11:50:32 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library