<div dir="ltr">2008/8/1 Marcin Krawczyk <span dir="ltr"><<a href="http://jankes.mk">jankes.mk</a>@<a
href="http://gmail.com">gmail.com</a>></span><br/><div class="gmail_quote"><blockquote class="gmail_quote"
style="border-left:1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Hi all. I'd like to
knowwhether it's possible to reverse the<br /> behaviour of regexp_replace, meaning :<br /> now if I do<br /> SELECT
regexp_replace('foobarbaz', 'b..', 'X') I get 'fooXbaz' - it<br /> replaces the string that matches given pattern with
'X',how do I<br /> achieve the opposite - replace the string that doesn't match the<br /> pattern ?<br /><br />
regards<br/> mk<br /><font color="#888888"><br /> --<br /> Sent via pgsql-sql mailing list (<a
href="mailto:pgsql-sql@postgresql.org">pgsql-sql@postgresql.org</a>)<br/> To make changes to your subscription:<br /><a
href="http://www.postgresql.org/mailpref/pgsql-sql"target="_blank">http://www.postgresql.org/mailpref/pgsql-sql</a><br
/></font></blockquote></div><br/><br clear="all" /><br clear="all" />merlin=# SELECT regexp_replace ('foobarbaz',
'[^b]','X', 'g');<br /> regexp_replace<br />----------------<br /> XXXbXXbXX<br />(1 row)<br /><br /><br />-- <br
/>--<br/>Serdecznie pozdrawiam<br /><br />Pawel Socha<br /><a
href="mailto:pawel.socha@gmail.com">pawel.socha@gmail.com</a><br/><br />programista/administrator<br /><br />perl -le
's**02).4^&-%2,).^9%4^!./4(%2^3,!#+7!2%^53%2&**y%&-;^[%"`-{ a%%s%%$_%ee'<br /></div>