Regular expression question with Postgres

From: Mike Christensen <mike(at)kitchenpc(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Regular expression question with Postgres
Date: 2014-07-24 20:31:13
Message-ID: CABs1bs3aaJPW1tyoY+esaHM8_ZYRoWOL=DmCaSfrWdZFFrWA9g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm curious why this query returns 0:

SELECT 'AAA' ~ '^A{,4}$'

Yet, this query returns 1:

SELECT 'AAA' ~ '^A{0,4}$'

Is this a bug with the regular expression engine?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G Johnston 2014-07-24 20:42:16 Re: Regular expression question with Postgres
Previous Message Karsten Hilbert 2014-07-24 20:28:05 Re: Table checksum proposal