The regex tag returns an array that contains information about the
location of a match.  It returns "M" if there is no match.  You might need
to assign the result of regex to a variable and then test it with
<@VARINFO> to see if it's an array or text.

On Tue, 10 Jun 2003, JimKass wrote:

> Hey Folks,
> 
> I am new to Tango - came from a Perl background, and I wanted to use the
> REGEX EXPR to test a form field for correct email syntax.
> 
> I'm using the following IF statement, but it only works if the RE gets a
> match, not if it fails.
> 
> Here's the If statement (if it doesn't match, then it should display a page,
> but it errors instead):
> 
> (!'<@REGEX EXPR="[EMAIL PROTECTED]" STR=<@ARG x_Email> TYPE=B>')
> 
> Here's the error:
> 
> File: newaccount.taf
> Position: If_RE_CheckEmail
> Class: Internal
> Main Error Number: -18
> 
> Error during expression evaluation.
> String not allowed in statement [(!M)]
> 
> ALSO...
> 
> I notice (this may be my RE) that an email like "[EMAIL PROTECTED]" will actually
> match, and no error is shown.
> 
> Thanks.
> 
> Jim Kass
> Web Developer
> 
> --
> Forestweb: The Source for Industry Intelligence
> Best Content -- Most Relevant -- Best Delivery
> http://www.forestweb.com
> (310) 553 - 0008
> 
> 
> ________________________________________________________________________
> TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
> 

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

Reply via email to