Title: Message
Hello all,
 
I have a question regarding the metatag <@REGEX >, which I can not  make it work.
In the code below, I have two identical fragments, except for the STR string.
All I am trying to do is to verify if the STR is a valid email address. The regular _expression_, EXPR, I verified to work fine in _javascript_, Perl and ASP. But I cannot figure out how it should be made to work in a taf file, and the documentation is useless.
 
When I run this code I always get exaclty the same result, <@VARINFO ..> reporting TEXT, and the variable local$re returns M,  weather the email string is valid or not.
 
Any ideas?
 
Many thanks,
Mike.


<@!  ------------------ STR = valid email address -------------------- >
<@ASSIGN NAME=local$re
        VALUE='<@REGEX EXPR="\w+([-+.]\w+)[EMAIL PROTECTED]([-.]\w+)*\.\w+([-.]\w+)*"      
        STR="[EMAIL PROTECTED]
        TYPE=B>'
>

<@VARINFO NAME=local$re ATTRIBUTE=TYPE> <@! this displays TEXT>
result = @@local$re <br>          <@! this displays M >

<@!  --------------------- STR = invalid email address ---------------- >
<@ASSIGN NAME=local$re
        VALUE='<@REGEX EXPR="\w+([-+.]\w+)[EMAIL PROTECTED]([-.]\w+)*\.\w+([-.]\w+)*"      
        STR="[EMAIL PROTECTED]@hotmail.com
        TYPE=B>'
>

<@VARINFO NAME=local$re ATTRIBUTE=TYPE> <@! this displays TEXT>
result = @@local$re <br>          <@! this displays M >


________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

Reply via email to