Re: regex help wanted - Mailing list pgsql-general

From Tom Lane
Subject Re: regex help wanted
Date
Msg-id 23482.1366900346@sss.pgh.pa.us
Whole thread Raw
In response to regex help wanted  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
Responses Re: regex help wanted
Re: regex help wanted
List pgsql-general
Karsten Hilbert <Karsten.Hilbert@gmx.net> writes:
> What I don't understand is: Why does the following return a
> substring ?

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

There's a perfectly valid match in which [^<]+? matches allergy::test
and [^:]+? matches 99.

            regards, tom lane


pgsql-general by date:

Previous
From: Andres Freund
Date:
Subject: Re: Replication terminated due to PANIC
Next
From: Thom Brown
Date:
Subject: Re: regex help wanted