Re: Regular Expressions -
08-06-2008
, 05:26 PM
artmerar (AT) yahoo (DOT) com wrote:
: Hi,
: I've been looking at REGEXP_LIKE to help me come up with a way to
: check the syntax of an email address. Basically I need to make sure
: that is does not contain any of the following characters: !#$%^&*()
: +=<>,?"':;{}[]|\/
actually, lots of odd things are valid in mail addresses, but let's ignore
that complexity for now
: And, there is only 1 @ and at least 1 .
: A bit harder than I expected. So, eventually I'll probably get it,
: but I'm looking for the quick way out if anyone else knows what it
: should look like.
: Much thanks!
It is often easier and safer to check for what is valid (or in this case,
what you are willing to allow).
Perhaps something like
^[a-zA-Z0-9\-\.]+\@([a-zA-Z0-9\-]+\.)+[a-zA-Z0-9\-]+$
(perl syntax, not sure if that's valid oracle). |