Re: BUG #4044: Incorrect RegExp substring Output

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #4044: Incorrect RegExp substring Output
Дата
Msg-id 1278.1205937839@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #4044: Incorrect RegExp substring Output  ("Rui Martins" <Rui.Martins@pdmfc.com>)
Ответы Re: BUG #4044: Incorrect RegExp substring Output  ("Rui Martins" <Rui.Martins@PDMFC.com>)
Список pgsql-bugs
"Rui Martins" <Rui.Martins@PDMFC.com> writes:
> Here the context of the word "match" may be misleading us, in this
> conversation.
> I say this, because in my report, the second substring expression, the one
> for RoomSize:

> SUBSTRING( BedNo, '^[[:digit:]]+([a-zA-Z]*)(:[[:digit:]]+)?$' ) AS RoomSize,

> Actually returns an EMPTY String, and not a NULL, for the first 2 test
> cases, which I believe is the correct answer.

What's your point?  A zero-length substring is a legal match to that
subexpression ... unlike the third one.

            regards, tom lane

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

Предыдущее
От: "Rui Martins"
Дата:
Сообщение: Re: BUG #4044: Incorrect RegExp substring Output
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Problem identifying constraints which should not be inherited