dbTalk Databases Forums  

Regular Expressions

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Regular Expressions in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
artmerar@yahoo.com
 
Posts: n/a

Default Regular Expressions - 08-06-2008 , 03:40 PM







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: !#$%^&*()
+=<>,?"':;{}[]|\/

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!

Reply With Quote
  #2  
Old   
Malcolm Dew-Jones
 
Posts: n/a

Default 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).


Reply With Quote
  #3  
Old   
Malcolm Dew-Jones
 
Posts: n/a

Default 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).


Reply With Quote
  #4  
Old   
Malcolm Dew-Jones
 
Posts: n/a

Default 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).


Reply With Quote
  #5  
Old   
Malcolm Dew-Jones
 
Posts: n/a

Default 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).


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.