[AWS] email checking function

Jacob Sparre Andersen jacob at jacob-sparre.dk
Mon Jun 29 19:18:42 CEST 2015


On 29/06-2015 17:59, Pascal Obry wrote:
> Le lundi 29 juin 2015 à 15:23 +0100, tony gair a écrit :
>> Is there a function somewhere in AWS that will validate a string as a
>> valid email?
> No, but it should be close to:
>
>   Pos_A : Natural := Strings.Fixed.Index (Email, "@");
>   Pos_P : Natural := Strings.Fixed.Index (Email, ".", From => Pos_A);
>
>   Pos_A in Email'First + 1 .. Email'Last - 2
>     and then
>   Pos_B in Pos_A + 1 .. Email'Last - 1
>
> Plus checks for non supported characters.
It is a bit more complicated than that.  Route-based e-mail addresses 
are still valid.

Greetings,

Jacob
-- 
"constructive ambiguity"



More information about the AWS mailing list