Re: [SQL] Replace string

2007-04-12 Thread PostgreSQL Admin
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:]]', ''), ' ',

Re: [SQL] Replace string

2007-04-11 Thread Rodrigo De León
On 4/10/07, PostgreSQL Admin <[EMAIL PROTECTED]> wrote: Hi, I want to replace a title with dashes and also remove punctuation. e.g, The blue fox's fur. -> The-blue-fox-fur Thanks for any input, J SELECT translate('The blue fox''s fur.', ' .''', '-') ---(end of broa

Re: [SQL] Replace string

2007-04-11 Thread A. Kretschmer
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'), '\\.

[SQL] Replace string

2007-04-11 Thread PostgreSQL Admin
Hi, I want to replace a title with dashes and also remove punctuation. e.g, The blue fox's fur. -> The-blue-fox-fur Thanks for any input, J ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate su