Search Postgresql Archives

Re: Quick Regex Question

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

 



On Thu, 20 Dec 2007 09:56:00 +0000
Howard Cole <howardnews@xxxxxxxxxxxxx> wrote:

> Hi all,
> 
> I don't understand the last result:
> 
> select 'Ho Ho Ho' ~* '^Ho'; returns true

There is actualli a Ho at the beginning of the string.

> select 'Ho Ho Ho' ~* ' Ho'; returns true

There are actually 2 ' Ho'

> select 'Ho Ho Ho' ~* '[^ ]Ho'; returns false (Please note there is
> a space between ^ and ])

There is no some character excluding space plus Ho.
What's missing is you're asking for some character before Ho.
The first Ho doesn't have a character preceding it.
The 2 other Ho have one... but it is a space and you don't want it.

-- 
Ivan Sergio Borgonovo
http://www.webthatworks.it


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[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