Re: back references using regex

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: back references using regex
Дата
Msg-id 20050911000049.GA47332@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: back references using regex  (Matthew Peter <survivedsushi@yahoo.com>)
Ответы Re: back references using regex  (Matthew Peter <survivedsushi@yahoo.com>)
Список pgsql-general
On Sat, Sep 10, 2005 at 10:27:13AM -0700, Matthew Peter wrote:
> ahhhhhhhhh I swear I never came across any of these
> gems of information in the docs. It was these subtle
> differences that were throwing me.

From "Regular Expression Escapes" in the "Pattern Matching" section
of the manual:

  A back reference (\n) matches the same string matched by the
  previous parenthesized subexpression specified by the number n
  (see Table 9-18).  For example, ([bc])\1 matches bb or cc but not
  bc or cb.  The subexpression must entirely precede the back
  reference in the RE.  Subexpressions are numbered in the order
  of their leading parentheses.  Non-capturing parentheses do not
  define subexpressions.

http://www.postgresql.org/docs/8.0/static/functions-matching.html#POSIX-ESCAPE-SEQUENCES

--
Michael Fuhr

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

Предыдущее
От: Ben
Дата:
Сообщение: Re: to_ascii, or some other form of magic transliteration
Следующее
От: Carlos Henrique Reimer
Дата:
Сообщение: Re: locale and encoding