pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PostgreSQL Admin <postgres@productivitymedia.com>
To: A. Kretschmer <andreas.kretschmer@schollglas.com>
Cc: pgsql-sql@postgresql.org, Rodrigo De León <rdeleonp@gmail.com>
Subject: Re: Replace string
Date: Thu, 12 Apr 2007 15:51:07 -0400
Message-ID: <461E8DAB.6090504@productivitymedia.com> (raw)
In-Reply-To: <20070412051250.GB27660@a-kretschmer.de>
References: <461BF649.70204@productivitymedia.com>
	<20070412051250.GB27660@a-kretschmer.de>


> test=*# select regexp_replace(regexp_replace('The blue fox\'s fur.', ' ', '-', 'g'), '\\.', '');
>    regexp_replace
> --------------------
>  The-blue-fox's-fur
> (1 row)
>
>
> Andreas
>   
Thanks for the input.


I came up with this:

REPLACE(regexp_replace('The blue fox\'s fur', '[[:punct:]]', ''), ' ', '-');



view thread (4+ messages)

Message-ID: <461E8DAB.6090504@productivitymedia.com>
Permalink:  ../461E8DAB.6090504@productivitymedia.com/
Also on:    postgresql.org/message-id/461E8DAB.6090504@productivitymedia.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: postgres@productivitymedia.com, andreas.kretschmer@schollglas.com, rdeleonp@gmail.com
  Subject: Re: Replace string
  In-Reply-To: <461E8DAB.6090504@productivitymedia.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox