Re: Quick Regex Question

Поиск
Список
Период
Сортировка
От Terry Fielder
Тема Re: Quick Regex Question
Дата
Msg-id 476A5908.8010404@ashtonwoodshomes.com
обсуждение исходный текст
Ответ на Re: Quick Regex Question  (Howard Cole <howardnews@selestial.com>)
Ответы Re: Quick Regex Question  (Howard Cole <howardnews@selestial.com>)
Список pgsql-general
<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
>

В списке pgsql-general по дате отправления:

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: foreign key constraint, planner ignore index.
Следующее
От: Howard Cole
Дата:
Сообщение: Re: Quick Regex Question