Re: regexp_matches for digit

Поиск
Список
Период
Сортировка
От Andy Colson
Тема Re: regexp_matches for digit
Дата
Msg-id 559EA664.70302@squeakycode.net
обсуждение исходный текст
Ответ на regexp_matches for digit  (Ramesh T <rameshparnanditech@gmail.com>)
Список pgsql-general
On 7/9/2015 11:24 AM, Ramesh T wrote:
> Hi,
>            in oracle regexp_like(entered
> date,'[[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2}','i')
>
> for postgres i have regexp_matches ,But i need how to match [:digit:] in
> postgres when we pass date..?
> any help

\d

per:
http://www.postgresql.org/docs/devel/static/functions-matching.html

# select 1 where '1234-56-78' ~ '\d{4}-\d{2}-\d{2}';
  ?column?
----------
         1
(1 row)



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

Предыдущее
От: Andy Colson
Дата:
Сообщение: Index Only Scan vs Cache
Следующее
От: Chris Mair
Дата:
Сообщение: Re: regexp_matches for digit