Re: regexp_matches for digit
| От | Chris Mair | 
|---|---|
| Тема | Re: regexp_matches for digit | 
| Дата | |
| Msg-id | b0b214ffa1e0f2c6e220f1c0654cec26@smtp.hushmail.com обсуждение исходный текст | 
| Ответ на | regexp_matches for digit (Ramesh T <rameshparnanditech@gmail.com>) | 
| Ответы | Re: regexp_matches for digit | 
| Список | pgsql-general | 
> 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
[:digit:] is Posix syntax, supported by Postgres.
Looks good to me:
graal=# select regexp_matches('2015-07-09',
'[[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2}','i');
 regexp_matches
----------------
 {2015-07-09}
(1 row)
graal=# select regexp_matches('2015-x7-09',
'[[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2}','i');
 regexp_matches
----------------
(0 rows)
What do you need, exactly?
Bye,
Chris.
		
	В списке pgsql-general по дате отправления: