You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Zsolt Koppany <zk...@web.de> on 2003/05/15 21:15:40 UTC

email validator expression question

Hi,

what is wrong with this validator expression:
	"^.+@.+\..+"

Is doesn't match for example "a@b.d".

Zsolt
	


Zsolt Koppany
Intland Software GmbH
mailto:zsolt.koppany@intland.com
Schulze-Delitzsch-Strasse 16
D-70565 Stuttgart
Phone: +49-711-7221873
Fax:   +49-711-7871017

 


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: email validator expression question

Posted by Mark Galbreath <ma...@qat.com>.
I didn't know that.  Shit!  I guess, then, the best you can do (besides
actually sending the address to a mail server and getting the response -
which would be s-l-o-w) is checking for the presence of anything before an
"@", and one or more "." after it.  I have noticed the spammers have gotten
quite inventive in formulating emails addresses that escape my McAfee Spam
Killer.

Mark

-----Original Message-----
From: Thomas Cornet [mailto:thomas@cornet.name] 
Sent: Thursday, May 15, 2003 4:12 PM
To: Struts Users Mailing List
Subject: RE: email validator expression question


At 21:51 15/05/2003, you wrote:
>I think what you want is something like
>
>/^[A-Za-z0-9\.]{1, }@[A-za-z0-9]\.[a-z]{2,3}/
>
>Mark

Don't forget that new extensions can have until 4 letters.

I must admit that I'm bored with forms rejecting my email... ;op



    Thomas


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: email validator expression question

Posted by Thomas Cornet <th...@cornet.name>.
At 21:51 15/05/2003, you wrote:
>I think what you want is something like
>
>/^[A-Za-z0-9\.]{1, }@[A-za-z0-9]\.[a-z]{2,3}/
>
>Mark

Don't forget that new extensions can have until 4 letters.

I must admit that I'm bored with forms rejecting my email... ;op



    Thomas


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: email validator expression question

Posted by Zsolt Koppany <zk...@web.de>.
I might be wrong, but I think /^[A-Za-z0-9\.]{1, }@[A-za-z0-9]\.[a-z]{2,3}/
allows only one character after "@".

I couldn't find the description how to write validator expression but
actually what I need is the regexp:
  "^.+@[^.]+\..*$"
(The string can contain any characters until "@", then can come any
characters until a "." what can be followed by anything.)

Can you help me please?

Zsolt

> -----Original Message-----
> From: struts-user-return-77369-zkoppany=web.de@jakarta.apache.org
> [mailto:struts-user-return-77369-zkoppany=web.de@jakarta.apache.org]On
> Behalf Of Mark Galbreath
> Sent: Donnerstag, 15. Mai 2003 21:51
> To: 'Struts Users Mailing List'
> Subject: RE: email validator expression question
>
>
> I think what you want is something like
>
> /^[A-Za-z0-9\.]{1, }@[A-za-z0-9]\.[a-z]{2,3}/
>
> Mark
>
> -----Original Message-----
> From: Zsolt Koppany [mailto:zkoppany@web.de]
> Sent: Thursday, May 15, 2003 3:16 PM
> To: Struts Users Mailing List
> Subject: email validator expression question
>
>
> Hi,
>
> what is wrong with this validator expression:
> 	"^.+@.+\..+"
>
> Is doesn't match for example "a@b.d".
>
> Zsolt
>
>
>
> Zsolt Koppany
> Intland Software GmbH
> mailto:zsolt.koppany@intland.com
> Schulze-Delitzsch-Strasse 16
> D-70565 Stuttgart
> Phone: +49-711-7221873
> Fax:   +49-711-7871017
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: email validator expression question

Posted by Mark Galbreath <ma...@qat.com>.
I think what you want is something like

/^[A-Za-z0-9\.]{1, }@[A-za-z0-9]\.[a-z]{2,3}/

Mark

-----Original Message-----
From: Zsolt Koppany [mailto:zkoppany@web.de] 
Sent: Thursday, May 15, 2003 3:16 PM
To: Struts Users Mailing List
Subject: email validator expression question


Hi,

what is wrong with this validator expression:
	"^.+@.+\..+"

Is doesn't match for example "a@b.d".

Zsolt
	


Zsolt Koppany
Intland Software GmbH
mailto:zsolt.koppany@intland.com
Schulze-Delitzsch-Strasse 16
D-70565 Stuttgart
Phone: +49-711-7221873
Fax:   +49-711-7871017

 


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org