On 2013-04-25, Karsten Hilbert karsten.hilb...@gmx.net wrote:
On Thu, Apr 25, 2013 at 10:32:26AM -0400, Tom Lane wrote:
Karsten Hilbert karsten.hilb...@gmx.net writes:
What I don't understand is: Why does the following return a
substring ?
select substring ('junk $allergy::test::99$
On 2013-04-25, Karsten Hilbert karsten.hilb...@gmx.net wrote:
On Thu, Apr 25, 2013 at 10:32:26AM -0400, Tom Lane wrote:
Karsten Hilbert karsten.hilb...@gmx.net writes:
What I don't understand is: Why does the following return a
substring ?
select substring ('junk $allergy::test::99$
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 '::[^:]+?'
Karsten Hilbert karsten.hilb...@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
On 25 April 2013 15:32, Tom Lane t...@sss.pgh.pa.us wrote:
Karsten Hilbert karsten.hilb...@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
On Thu, Apr 25, 2013 at 10:32:26AM -0400, Tom Lane wrote:
Karsten Hilbert karsten.hilb...@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
On Thu, Apr 25, 2013 at 03:40:51PM +0100, Thom Brown wrote:
On 25 April 2013 15:32, Tom Lane t...@sss.pgh.pa.us wrote:
Karsten Hilbert karsten.hilb...@gmx.net writes:
What I don't understand is: Why does the following return a
substring ?
select substring ('junk
Karsten Hilbert karsten.hilb...@gmx.net writes:
I would have thought [^]+?: should mean:
match a
followed by 1-n characters as long as they are not
until the VERY NEXT :
The ? should make the + after [^] non-greedy and thus
stop at the first occurrence of :, right ? Or