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> 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 по дате отправления:

Предыдущее
От: Christian Mächler
Дата:
Сообщение: 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)