[HACKERS] Re: Patch: regexp_matches variant returning an array of matching positions

2014-01-28 Thread David Johnston
Erik Rijkers wrote > On Wed, January 29, 2014 05:16, David Johnston wrote: >> >> How does this resolve in the patch? >> >> SELECT regexp_matches('abcabc','((a)(b)(c))','g'); >> > > With the patch: > > testdb=# SELECT regexp_matches('abcabc','((a)(b)(c))','g'), > regexp_matches_positions('abcabc',

Re: [HACKERS] Re: Patch: regexp_matches variant returning an array of matching positions

2014-01-28 Thread Erik Rijkers
On Wed, January 29, 2014 05:16, David Johnston wrote: > > How does this resolve in the patch? > > SELECT regexp_matches('abcabc','((a)(b)(c))','g'); > With the patch: testdb=# SELECT regexp_matches('abcabc','((a)(b)(c))','g'), regexp_matches_positions('abcabc','((a)(b)(c))'); regexp_matches | r

[HACKERS] Re: Patch: regexp_matches variant returning an array of matching positions

2014-01-28 Thread David Johnston
Alvaro Herrera-9 wrote > Björn Harrtell wrote: >> I've written a variant of regexp_matches called regexp_matches_positions >> which instead of returning matching substrings will return matching >> positions. I found use of this when processing OCR scanned text and >> wanted >> to prioritize matches