Re: Our regex vs. POSIX on "longest match"
От | Tom Lane |
---|---|
Тема | Re: Our regex vs. POSIX on "longest match" |
Дата | |
Msg-id | 2033.1330892403@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Our regex vs. POSIX on "longest match" (hubert depesz lubaczewski <depesz@depesz.com>) |
Ответы |
Re: Our regex vs. POSIX on "longest match"
|
Список | pgsql-hackers |
hubert depesz lubaczewski <depesz@depesz.com> writes: > I stand on position that mixing greedy and non-greedy operators should > be possible, and that it should work according to POLA - i.e. greedines > of given atom shouldn't be influenced by other atoms. [ shrug... ] That sounds good, but it's pretty much vacuous as far as defining a principled alternative behavior goes. It's easy to demonstrate cases where atoms *must* be influenced by other ones. A trivial example is(.*)(.*) It doesn't matter whether the second atom is greedy or not: it's not going to get to eat anything because the first one does instead. IOW this is just the same as(.*)(.*?) --- they are both overall-greedy. regards, tom lane
В списке pgsql-hackers по дате отправления: