regex help wanted

Поиск
Список
Период
Сортировка
От Karsten Hilbert
Тема regex help wanted
Дата
Msg-id 20130425141127.GH3802@hermes.hilbert.loc
обсуждение исходный текст
Ответы Re: regex help wanted
Список pgsql-general
Hi,

I am in the process of converting some TEXT data which I try
to identify by regular expression.

What I don't understand is: Why does the following return a
substring ?

    select substring ('junk $<allergy::test::99>$ junk' from '\$<[^<]+?::[^:]+?>\$');

I would have thought the '::[^:]+?>' part should have meant

    after two ":"s
    match at least one character
    except any further ":"s
    until the next ">"

I don't find the flaw in my thinking. Can anyone help ?

(Sure, it is not PostgreSQL-specific yet I need to run this
in PostgreSQL on data migration.)

Karsten
--
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: pgdump error "Could not open file pg_clog/0B8E: No such file or directory"
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Replication terminated due to PANIC