Search Postgresql Archives

Re: Quick Regex Question

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

 



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

"A /bracket expression/ is a list of characters enclosed in []. It normally matches any single character from the list (but see below). If the list begins with ^, it matches any single character /not/ from the rest of the list."

from: http://www.postgresql.org/docs/8.3/static/functions-matching.html#POSIX-BRACKET-EXPRESSIONS

Regards
Florian

--
Media Ventures GmbH Jabber-ID faumeier@xxxxxxxxx
Telefon +49 (0) 2236 480 10 22


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[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