regex failing

From: Zahir Lalani <ZahirLalani(at)oliver(dot)agency>
To: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: regex failing
Date: 2023-06-27 18:59:34
Message-ID: DB9P251MB0546762BBFBA3476E8DE2635A727A@DB9P251MB0546.EURP251.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi All

Got a weird one. I am using the regex below to case match numeric only values.

'^([0-9]+[.]?[0-9]*)$'

This works well by and large but not for a value like “1234:567”. This seems to match positive and then fails due to not being an actual number in the subsequent cast.

Any ideas? (PG13)

Z

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2023-06-27 19:08:57 Re: typical active table count?
Previous Message Jeremy Schneider 2023-06-27 18:47:57 Re: typical active table count?