Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Pratt <fairwinds@xxxxxxxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux