Re: BUG #13538: REGEX non-greedy is working incorrectly (and also greedy matches fail if non-greedy is present)
От | Christian Mächler |
---|---|
Тема | Re: BUG #13538: REGEX non-greedy is working incorrectly (and also greedy matches fail if non-greedy is present) |
Дата | |
Msg-id | DUB128-W2990BB7605238976ADE6AEF8760@phx.gbl обсуждение исходный текст |
Ответ на | 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>) |
Ответы |
Re: BUG #13538: REGEX non-greedy is working incorrectly (and also greedy matches fail if non-greedy is present)
|
Список | 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 по дате отправления: