Patch: regexp_matches variant returning an array of matching positions

From: Björn Harrtell <bjorn(dot)harrtell(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Patch: regexp_matches variant returning an array of matching positions
Date: 2014-01-28 19:24:08
Message-ID: CANhDX=bc5VnJVByefeDu5+Kaxd7jsAb1R9JQDSzF=w1eRiEZ6Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 based on their position.

The patch is for discussion. I'd also appriciate general suggestions as
this is my first experience with the postgresql code base.

The patch is against the master branch and includes a simple regression
test.

Attachment Content-Type Size
regexp_matches_positions_v1.diff text/plain 6.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2014-01-28 19:28:06 Re: proposal: hide application_name from other users
Previous Message Josh Berkus 2014-01-28 19:09:18 Re: jsonb and nested hstore