Try this. <@ASSIGN NAME="regval" VALUE='<@REGEX EXPR="[EMAIL PROTECTED]" STR=<@ARG x_Email> TYPE=B>' SCOPE="local"> <@IF EXPR="@@local$regval[1,1] = 'M'"> Invalid email address <@ELSE> Valid email address </@IF>
Ben Johansen - http://www.pcforge.com Authorized Witango Reseller http://www.pcforge.com/WitangoGoodies.htm Authorized MDaemon Mail Server Reseller http://www.pcforge.com/AltN.htm -----Original Message----- From: JimKass [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 10:32 AM To: [EMAIL PROTECTED] Subject: Witango-Talk: REGEX EXPR Question 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
