Re: FInding "corrupt" values in UTF-8 tables (regexp question, I think)

Поиск
Список
Период
Сортировка
От Michael Glaesemann
Тема Re: FInding "corrupt" values in UTF-8 tables (regexp question, I think)
Дата
Msg-id 2DA6174E-A765-46BB-8AF4-30DDF2474CB3@seespotcode.net
обсуждение исходный текст
Ответ на FInding "corrupt" values in UTF-8 tables (regexp question, I think)  ("Phoenix Kiula" <phoenix.kiula@gmail.com>)
Ответы Re: FInding "corrupt" values in UTF-8 tables (regexp question, I think)
Список pgsql-general
On Aug 17, 2007, at 10:58 , Phoenix Kiula wrote:

> What would be the SQL to find data of this nature? My column can only
> have alphanumeric data, and the only symbols allowed are "-" and "_",
> so I tried this regexp query:
>
>     select id, t_code
>     from traders
>     where t_code ~ '[^A-Za-z1-9\-]'

If you're including - in a range as a character, doesn't it have to
go first?
Try this:

WHERE t_code ~ $re$[^-A-Za-z1-9_]$re$

Michael Glaesemann
grzm seespotcode net



В списке pgsql-general по дате отправления:

Предыдущее
От: Manuel Sugawara
Дата:
Сообщение: Re: FInding "corrupt" values in UTF-8 tables (regexp question, I think)
Следующее
От: Steve Atkins
Дата:
Сообщение: Re: Help creating a function