This is the regex I like to use to validate an email. It will work with pretty well any RFC 822 address.
<@REGEX
EXPR="^([_a-zA-Z0-9-]+)(\.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+)(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,4})$"
STR="[EMAIL PROTECTED]"
TYPE="E">
Yes [EMAIL PROTECTED] meets RFC822 compliance.
Phil
> From: "Dan Stein" <[EMAIL PROTECTED]>
> Date: 1 March 2005 7:27:21 AM
> To: <[email protected]>
> Subject: Witango-Talk: Reg Ex Help
> Reply-To: [email protected]
>
> This worked with server 5.0x
>
> �
>
> �
>
> <@ASSIGN NAME="request$checkEmail" VALUE='<@REGEX
> EXPR="^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)[EMAIL PROTECTED](\.[a-zA-Z0
> -9-]+)+$"� STR="<@ARG email>" TYPE="E">'>
>
> �
>
> �
>
> </@COMMENT>
>
> <@IF EXPR="<@NUMROWS ARRAY=@@request$checkemail>>0">
>
> <@ASSIGN NAME="request$validEmail" VALUE="OK">
>
> �
>
> <@ELSE>
>
> <@ASSIGN NAME="request$validEmail" VALUE="C">
>
> </@IF>
>
> �
>
> But with 5.5 gets this error
>
> �
>
> Error
>
> An error occurred while processing your request:
>
> File: email.tml
> Position: THTML
> Class: Internal
> Main Error Number: -603
>
> The array subscript is not within the range for the defined array.
> row = 2 col = 1
>
> File: email.tml
> Position: THTML
> Class: Internal
> Main Error Number: -603
>
> The array subscript is not within the range for the defined array.
> row = 3 col = 1
>
> Meta Stack Trace:
>
> Line
>
> Meta Tag
>
> 0001
>
> <@REGEX
> EXPR="^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)[EMAIL PROTECTED](\.[a-zA-Z0
> -9-]+)+$" STR="[EMAIL PROTECTED]" TYPE="E">
>
> 0002
>
> �
>
> *The meta stack is interpreted top-to-bottom: the top line shows the
> inner metatag that caused the error.
________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
