Search Postgresql Archives

substring and POSIX re's

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

 



Hi.

First: PG version 7.4 and 8.0.

I have a question regarding the following simplified query:


gds2=# select substring('NE NE SE 2310 FSL 330 FEL' from '^([A-Z][A-Z] )+'); substring ----------- SE (1 row)

The pg docs say that this form of substring uses POSIX re's, and my understanding of POSIX re's is they are always greedy. So, why do I get only SE instead of NE NE SE? Pilot error, probably, but would someone please enlighten me? Thank you very much.

Don

p.s. The target string can have from 1 to 6 of the 2 char strings, not just 3 as shown in this example.

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@xxxxxxxxxxxxxx

[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