Re: Regex escape [ character and change text result into integer

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Regex escape [ character and change text result into integer
Дата
Msg-id 23620.1120580577@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Regex escape [ character and change text result into integer  (David Pratt <fairwinds@eastlink.ca>)
Ответы Re: Regex escape [ character and change text result into  (David Pratt <fairwinds@eastlink.ca>)
Список pgsql-general
David Pratt <fairwinds@eastlink.ca> writes:
> Hi.  I am using array_dims to give me dimensions of  multidimensional
> array ie:

> [1:5][1:2]

> In my function I want to retreive the value of the second number from
> array_dims (5 in example above)

Why aren't you using array_upper()?

> This is what I am trying:
> count_str = substr(dimensions from '\[\d\:(\d+)\]\[\d\:\d\]')

Perhaps you forgot to double the backslashes?

            regards, tom lane

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

Предыдущее
От: David Pratt
Дата:
Сообщение: Regex escape [ character and change text result into integer
Следующее
От: Jaime Casanova
Дата:
Сообщение: default tablespaces