2008/8/1 Marcin Krawczyk <[EMAIL PROTECTED]> > Hi all. I'd like to know whether it's possible to reverse the > behaviour of regexp_replace, meaning : > now if I do > SELECT regexp_replace ('foobarbaz', 'b..', 'X') I get 'fooXbaz' - it > replaces the string that matches given pattern with 'X', how do I > achieve the opposite - replace the string that doesn't match the > pattern ? > > regards > mk > > -- > Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-sql >
merlin=# SELECT regexp_replace ('foobarbaz', '[^b]', 'X', 'g'); regexp_replace ---------------- XXXbXXbXX (1 row) -- -- Serdecznie pozdrawiam Pawel Socha [EMAIL PROTECTED] programista/administrator perl -le 's**02).4^&-%2,).^9%4^!./4(%2^3,!#+7!2%^53%2&**y%& -;^[%"`-{ a%%s%%$_%ee'