pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: kosiodg@yahoo.com
Subject: BUG #17761: Questionable regular expression behavior
Date: Fri, 27 Jan 2023 09:27:35 +0000
Message-ID: <17761-5a78c34533f3ab72@postgresql.org> (raw)

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



view thread (4+ messages)  latest in thread

Message-ID: <17761-5a78c34533f3ab72@postgresql.org>
Permalink:  ../17761-5a78c34533f3ab72@postgresql.org/
Also on:    postgresql.org/message-id/17761-5a78c34533f3ab72@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, kosiodg@yahoo.com
  Subject: Re: BUG #17761: Questionable regular expression behavior
  In-Reply-To: <17761-5a78c34533f3ab72@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox