<Snip>
Howard Cole wrote:
Hi Marijn, Andreas,
I think Andreas is right, note the ordering of characters in the above
example as [ ^] rather than [^ ].
So if the '^' is taken as literal '^', can I check for the beginning
of a string in the brackets,
Why do you need to? Check for the beginning of the string BEFORE the
set brackets. The point of set brackets is "match from a set of
chars". Since "beginning of string" can only match one place, it has no
meaning as a member of a set. Or in other words, if it has meaning, it
needs to be matched FIRST out of the set, and therefore you can just
remove from the set and put before the set brackets.
or am I forced to use the (^| ) syntax?
Is it just me or are regular expressions crazy?
Complicated, not crazy.
Terry
Howard
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org/