Re: Replace string

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Replace string
Date: 2007-04-12 05:12:50
Message-ID: 20070412051250.GB27660@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Rodrigo De León 2007-04-12 05:29:13 Re: Replace string
Previous Message Joe 2007-04-12 04:07:07 Re: [SQL] Urgent help in bit_string data type