BUG #17761: Questionable regular expression behavior - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #17761: Questionable regular expression behavior
Date
Msg-id 17761-5a78c34533f3ab72@postgresql.org
Whole thread Raw
Responses Re: BUG #17761: Questionable regular expression behavior  (hubert depesz lubaczewski <depesz@depesz.com>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      17761
Logged by:          Konstantin Geordzhev
Email address:      kosiodg@yahoo.com
PostgreSQL version: 11.10
Operating system:   tested online
Description:

Executing:
select regexp_matches('a 1x1250x2500',
'(a).*?([1-9]\d*)\s*x\s*([1-9]\d*)(?:\s*x\s*([1-9]\d*))?');
returns: {a,1,1,NULL}
while executing:
select regexp_matches('a 1x1250x2500',
'(a|b).*?([1-9]\d*)\s*x\s*([1-9]\d*)(?:\s*x\s*([1-9]\d*))?');
returns: {a,1,1250,2500}

Shouldn't both results be equal?

Tested online at:
https://extendsclass.com/postgresql-online.html
and on ubuntu version 9.5


pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: FW: Query execution failure
Next
From: PG Bug reporting form
Date:
Subject: BUG #17762: date field casts to null in case section with join's