Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 12AD49FB9FC for ; Thu, 12 Apr 2007 02:23:01 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 22479-02-2 for ; Thu, 12 Apr 2007 02:22:57 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.174]) by postgresql.org (Postfix) with ESMTP id A20289FB467 for ; Thu, 12 Apr 2007 02:22:57 -0300 (ADT) Received: from [194.25.154.138] (helo=webserv.wug.de) by mrelayeu.kundenserver.de (node=mrelayeu6) with ESMTP (Nemesis), id 0ML29c-1Hbrc327Bi-0003Qc; Thu, 12 Apr 2007 07:12:51 +0200 Received: from kretschmer by webserv.wug.de with local (Exim 3.36 #1) id 1Hbrc2-0007I6-00 for pgsql-sql@postgresql.org; Thu, 12 Apr 2007 07:12:50 +0200 Date: Thu, 12 Apr 2007 07:12:50 +0200 From: "A. Kretschmer" To: pgsql-sql@postgresql.org Subject: Re: Replace string Message-ID: <20070412051250.GB27660@a-kretschmer.de> References: <461BF649.70204@productivitymedia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <461BF649.70204@productivitymedia.com> X-OS: Debian/GNU Linux - weil ich es mir Wert bin! X-Message-Flag: "Windows" is not the answer. "Windows" is the question and the answer is "no"! User-Agent: Mutt/1.5.9i X-Provags-ID: V01U2FsdGVkX18rZ4GmpNSUgZABdQgdW3UkLSlkCmwQWWqrwpk BbPslUJ9Ebl/rVt2Zx+wILmjhPlhJc2MZ6U3jgBso33uXhjcfF 92n8PWejum905dGCstSl3bBJ+FNjCfL X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/124 X-Sequence-Number: 28124 am Tue, dem 10.04.2007, um 16:40:41 -0400 mailte PostgreSQL Admin folgendes: > Hi, > > I want to replace a title with dashes and also remove punctuation. > > e.g, The blue fox's fur. -> The-blue-fox-fur test=*# select regexp_replace(regexp_replace('The blue fox\'s fur.', ' ', '-', 'g'), '\\.', ''); regexp_replace -------------------- The-blue-fox's-fur (1 row) Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header) GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net