Re: Regular Expression Matching problem...

Поиск
Список
Период
Сортировка
От Mario Splivalo
Тема Re: Regular Expression Matching problem...
Дата
Msg-id 1136769769.19539.2.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: Regular Expression Matching problem...  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-sql
On Wed, 2006-01-04 at 10:00 -0700, Michael Fuhr wrote:

> What Andreas is saying is that the patterns in the table have too
> many backslashes.  The original query was
> 
> test=> select '+385911234567' ~ '^\\+38591\\d{7}$';
>  ?column? 
> ----------
>  t
> (1 row)
> 
> but if you select just the pattern you get
> 
> test=> select '^\\+38591\\d{7}$';
>     ?column?    
> ----------------
>  ^\+38591\d{7}$
> (1 row)

I was a bit silly here. Dunno why I tought I need to escape the
backslashes when entering regexp as data in table. Thank you for
pointing that out.
Mike



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

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: INSERT waiting under heavy load
Следующее
От: David Ford
Дата:
Сообщение: system view corrupted, i get "unexpected right parenthesis" for many system tables.