Regular expressions

From: "Tumurbaatar S(dot)" <tumurbaatar(at)datacom(dot)mn>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Regular expressions
Date: 2004-04-12 06:36:30
Message-ID: 001101c42058$85f67930$13670296@TUMURS
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 '(dot)+(at)(dot)+\(dot)(dot)+')))

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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Siew Hui, Wong 2004-04-12 06:48:23 Re: Error in function to pg_dump: Standard in must be a tty
Previous Message Tom Lane 2004-04-12 05:27:42 Re: Error in function to pg_dump: Standard in must be a tty