Regular expressions

Поиск
Список
Период
Сортировка
От Tumurbaatar S.
Тема Regular expressions
Дата
Msg-id 001101c42058$85f67930$13670296@TUMURS
обсуждение исходный текст
Ответы Re: Regular expressions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
What does this '.{2,}' RE pattern mean?

1. 2 or more of any char
2. 2 or more of same char

I assume the answer is the 1st one. If yes,
how the 2nd's pattern should be look?

Thanks.

P.S.
I'm going to use CHECKs to make some basic validations of
email and passwords (5-15 chars):

CHECK (length(Email) = length(substring(Email from '.+@.+\..+')))

CHECK (length(Password) = length(substring(Password from
'[0-9_A-Za-z]{5,15}')))

Can anybody suggest shorter (or compatible with other RE engines) variants?
If possible using only Basic RE or if not, using ERE, but not ARE.


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Error in function to pg_dump: Standard in must be a tty
Следующее
От: "Siew Hui, Wong"
Дата:
Сообщение: Re: Error in function to pg_dump: Standard in must be a tty