Help with reg_exp

Поиск
Список
Период
Сортировка
От John Gage
Тема Help with reg_exp
Дата
Msg-id cd15286d1003241158l53822e8cvd554ead33869cfa9@mail.gmail.com
обсуждение исходный текст
Список pgsql-sql
[I mistakenly used the wrong Subject line initially with this post]

In going through the arcana of string functions, I have come across the following series of selects that contain, for me, a mysterious "$re$".

-- return all matches from regexp
SELECT regexp_matches('
foobarbequebaz', $re$(bar)(beque)$re$);

-- test case insensitive
SELECT regexp_matches('foObARbEqUEbAz', $re$(bar)(beque)$re$, 'i');

-- global option - more than one match
SELECT regexp_matches('foobarbequebazilbarfbonk', $re$(b[^b]+)(b[^b]+)$re$, 'g');

When I run this I get:

regexp_matches
--------------------------
<Unknown(2,003)>

I have not been able to find out what it all means.  Forgive me for my blindness.

John

P.S. The author of the statements is "alexk" at Command Prompt.  They are test statements against Postgres' string functions.

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

Предыдущее
От: Nilesh Govindarajan
Дата:
Сообщение: Help me with this multi-table query
Следующее
От: John Gage
Дата:
Сообщение: Dollar quoted strings