Is anyone working on this feature[1] also for PostgreSQL's regex engine?
I'm thinking it could work something like this:
joel=# \df regexp_match List of functions Schema | Name | Result data type | Argument data types | Type ------------+--------------+------------------+---------------------+-------- pg_catalog | regexp_match | jsonb | text, text | normal pg_catalog | regexp_match | jsonb | text, text, text | normal (2 rows)
I think this feature would be awesome, for the reasons mentioned in [1], quote:
"Referring to capture groups via numbers has several disadvantages: 1. Finding the number of a capture group is a hassle: you have to count parentheses. 2. You need to see the regular expression if you want to understand what the groups are for. 3. If you change the order of the capture groups, you also have to change the matching code."