Re: Removing whitespace using regexp_replace
От
Thomas Kellerer
Тема
Re: Removing whitespace using regexp_replace
Дата
Msg-id
fg26oe$dfg$1@ger.gmane.org
Ответ на
Re: Removing whitespace using regexp_replace (Andreas Kretschmer)
Список
Дерево обсуждения
Removing whitespace using regexp_replace Thomas Kellerer <spam_eater@gmx.net>
Re: Removing whitespace using regexp_replace Andreas Kretschmer <akretschmer@spamfence.net>
Re: Removing whitespace using regexp_replace Thomas Kellerer <spam_eater@gmx.net>
Re: Removing whitespace using regexp_replace Andreas Kretschmer <akretschmer@spamfence.net>
Re: Removing whitespace using regexp_replace Thomas Kellerer <spam_eater@gmx.net>
Andreas Kretschmer wrote on 28.10.2007 13:32: >> But it seems my problem was actually caused by something else: >> >> SELECT regexp_replace(myfield, '\s*', '', 'g') >> FROM mytable; > > you should escape the \, change to ...'\\s*'... Ah! Didn't think this was necessary, as \t or \n did not need to be escaped. > But without anchors this replaces all whitespaces, also within the text > and not only at the beginning/end (^ and $) Yes of course, this was only for testing ;) Thanks for your help! Thomas
В списке pgsql-sql по дате отправления