From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Quick Regex Question |
Date: | 2007-12-20 11:14:07 |
Message-ID: | 476A4E7F.1010504@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Martijn van Oosterhout wrote:
> On Thu, Dec 20, 2007 at 11:51:34AM +0100, A. Kretschmer wrote:
>> am Thu, dem 20.12.2007, um 10:36:08 +0000 mailte Howard Cole folgendes:
>>> Your expression works fine Richard, as does '(^| )ho', but can you tell
>>> me why '[ ^]ho' doesn't work?
>> With ^ you means an anchor, but within the brackets it's a simple char.
>
> Err no, it inverts the test. [^ ] means any character *except* a space.
But only if it's the first character within the brackets.
Which is the opposite of how "-" behaves inside square-brackets of course.
Aren't regexps fun :-)
--
Richard Huxton
Archonet Ltd
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Nesheret | 2007-12-20 11:14:22 | Re: foreign key constraint, planner ignore index. |
Previous Message | Karsten Hilbert | 2007-12-20 11:05:54 | Re: Postgres 8.3 HOT and non-persistent xids |