Re: [HACKERS] Regex pattern with shorter back reference does NOT work as expected

2013-07-18 Thread Tom Lane
Jeevan Chalke writes: >>> Following example does not work as expected: >>> >>> -- Should return TRUE but returning FALSE >>> SELECT 'Programmer' ~ '(\w).*?\1' as t; For the archives' sake --- I've filed a report about this with the Tcl crew. They seem to have moved their bugtracker recently; it

Re: [HACKERS] Regex pattern with shorter back reference does NOT work as expected

2013-07-15 Thread Jeevan Chalke
Hi Tom, On Sat, Jul 13, 2013 at 10:43 PM, Tom Lane wrote: > I wrote: > > Jeevan Chalke writes: > >> Following example does not work as expected: > >> > >> -- Should return TRUE but returning FALSE > >> SELECT 'Programmer' ~ '(\w).*?\1' as t; > > > This is clearly broken, but I'm uncomfortable

Re: [HACKERS] Regex pattern with shorter back reference does NOT work as expected

2013-07-13 Thread Tom Lane
I wrote: > Jeevan Chalke writes: >> Following example does not work as expected: >> >> -- Should return TRUE but returning FALSE >> SELECT 'Programmer' ~ '(\w).*?\1' as t; > This is clearly broken, but I'm uncomfortable with the proposed patch. > As written, it changes behavior for both the shor

Re: [HACKERS] Regex pattern with shorter back reference does NOT work as expected

2013-07-11 Thread Tom Lane
Jeevan Chalke writes: > Following example does not work as expected: > -- Should return TRUE but returning FALSE > SELECT 'Programmer' ~ '(\w).*?\1' as t; This is clearly broken, but I'm uncomfortable with the proposed patch. As written, it changes behavior for both the shortest-match-preferred

[HACKERS] Regex pattern with shorter back reference does NOT work as expected

2013-07-10 Thread Jeevan Chalke
Hi Tom, Following example does not work as expected: -- Should return TRUE but returning FALSE SELECT 'Programmer' ~ '(\w).*?\1' as t; -- Should return P, a and er i.e. 3 rows but returning just one row with -- value Programmer SELECT REGEXP_SPLIT_TO_TABLE('Programmer','(\w).*?\1'); Initially I