9.5.3: substring: regex greedy operator not picking up chars as expected

Поиск
Список
Период
Сортировка
От Foster, Russell
Тема 9.5.3: substring: regex greedy operator not picking up chars as expected
Дата
Msg-id BLUPR0401MB169851229377B5C9780EAC6B9D120@BLUPR0401MB1698.namprd04.prod.outlook.com
обсуждение исходный текст
Ответы Re: 9.5.3: substring: regex greedy operator not picking up chars as expected
Re: 9.5.3: substring: regex greedy operator not picking up chars as expected
Список pgsql-bugs
Hello,

For the following query:

select substring('>772' from '.*?[0-9]+')

I would expect the output to be '>772', but it is '>7'.  You can also see t=
he expected result on https://regex101.com/, although I am aware not all re=
gex processors work the same.

The following queries:

select substring('>772' from '^.*?[0-9]+$')

and:

select substring('>772' from '[0-9]+')

both return '>772', which is expected.  Could the less greedy operator on t=
he left (.*?) be affecting the more greedy right one (+)?

Thanks,
Russell Foster

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

Предыдущее
От: Devrim Gündüz
Дата:
Сообщение: Re: BUG #14288: sd_notify not called on startup using rhel RPMs
Следующее
От:
Дата:
Сообщение: Re: BUG #14288: sd_notify not called on startup using rhel RPMs