Re: regex failing

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: regex failing
Дата
Msg-id CAKFQuwZoBj6uD1Kmu-QjRsDj4CZYKWhuvaAJrBFcNB9N1aiCjQ@mail.gmail.com
обсуждение исходный текст
Ответ на regex failing  (Zahir Lalani <ZahirLalani@oliver.agency>)
Список pgsql-general
On Tue, Jun 27, 2023 at 11:59 AM Zahir Lalani <ZahirLalani@oliver.agency> wrote:

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.


 
Works (returns false) here:
select '1234:567' ~ '^([0-9]+[.]?[0-9]*)$';


David J.

В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: typical active table count?
Следующее
От: Steve Baldwin
Дата:
Сообщение: Re: regex failing