Re: Literal '-' in regular expression bracket sets

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Literal '-' in regular expression bracket sets
Дата
Msg-id 27930.1031252176@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Literal '-' in regular expression bracket sets  (Steve <s-psql@rhythm.cx>)
Список pgsql-general
Steve <s-psql@rhythm.cx> writes:
> I'm trying to place a literal '-' in a bracketed character set in a regular
> expression for a check constraint.

Per the manual:

To include a literal ] in the list, make it the first character
(following a possible ^). To include a literal -, make it the first or
last character, or the second endpoint of a range. To use a literal - as
the first endpoint of a range, enclose it in [. and .] to make it a
collating element (see below). With the exception of these and some
combinations using [ (see next paragraphs), all other special
characters, including \, lose their special significance within a
bracket expression.

            regards, tom lane

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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: Literal '-' in regular expression bracket sets
Следующее
От: Steve
Дата:
Сообщение: Re: Literal '-' in regular expression bracket sets