Re: BUG #13538: REGEX non-greedy is working incorrectly (and also greedy matches fail if non-greedy is present)
От | Tom Lane |
---|---|
Тема | Re: BUG #13538: REGEX non-greedy is working incorrectly (and also greedy matches fail if non-greedy is present) |
Дата | |
Msg-id | 26003.1438700337@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: BUG #13538: REGEX non-greedy is working incorrectly (and also greedy matches fail if non-greedy is present) (Christian Mächler<christian_maechler@hotmail.com>) |
Ответы |
Re: BUG #13538: REGEX non-greedy is working incorrectly (and also greedy matches fail if non-greedy is present)
Re: BUG #13538: REGEX non-greedy is working incorrectly (and also greedy matches fail if non-greedy is present) |
Список | pgsql-bugs |
Christian Mächler <christian_maechler@hotmail.com> writes: > Here some more detailed examples to show why the behavior of the 3rd group is clearly wrong also according to the specification: What specification are you reading? The POSIX standard for regular expressions doesn't mention non-greedy quantifiers at all. As David says, these examples appear to be following what's stated in http://www.postgresql.org/docs/9.4/static/functions-matching.html#POSIX-MATCHING-RULES The Spencer regex engine we use has a notion of greediness or non-greediness of the entire regex, and further that that takes precedence for determining the overall match length over greediness of individual subexpressions. That behavior might be inconvenient for this particular use-case, but that doesn't make it a bug. regards, tom lane
В списке pgsql-bugs по дате отправления: