Re: BUG #13538: REGEX non-greedy is working incorrectly (and also greedy matches fail if non-greedy is present) - Mailing list pgsql-bugs

From Christian Mächler
Subject Re: BUG #13538: REGEX non-greedy is working incorrectly (and also greedy matches fail if non-greedy is present)
Date
Msg-id DUB128-W2990BB7605238976ADE6AEF8760@phx.gbl
Whole thread Raw
In response to Re: BUG #13538: REGEX non-greedy is working incorrectly (and also greedy matches fail if non-greedy is present)  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: BUG #13538: REGEX non-greedy is working incorrectly (and also greedy matches fail if non-greedy is present)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
<div dir="ltr">Sorry probably sent my mail to the wrong address before.<br /><br />Here some more detailed examples to
showwhy the behavior of the 3rd group is clearly wrong also according to the specification:<br /><br />abc0.123def
applyingthe first regex (with optional dot)--> abc0.12 , 3, def<br /><br />abc0.123def applying the 2nd regex (with
optionaldot) --> , 3 ,<br /><br />Although the 3rd group wasn't touched it changed it's behavior from geedy to
non-greedy.abc, 0.123, def would be correct.<br /><br />The behavior of the non-greedy group isn't correct either,
becausea match should return the FIRST match found, greedyness is only about the FOLLOWING characters, but because it
willalready find a match at start position it should return that and not keep looking to find another match with
reducedgroup size.<br /><br />I was just trying to help, because I think this is a pretty big issue, although not using
regexatm.<br /><br />Chris<br /></div> 

pgsql-bugs by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: BUG #13536: SQLParamData thows "Invalid Endian" error
Next
From: Tom Lane
Date:
Subject: Re: BUG #13538: REGEX non-greedy is working incorrectly (and also greedy matches fail if non-greedy is present)