I think <@KEEP> would be an easier way to do this.

<@IFEQUAL @@local$string <@KEEP @@local$string
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789">>
  No non-alphanumeric characters
</@IF>

The RE you are using might have a problem with the ":-." part, which reads
like a range of characters.  And, "." is also a metacharacter.  You probably
want to escape these characters, like so:

EXPR="[^A-Za-z0-9\\/:\-\.]"

-----Original Message-----
From: Wayne Irvine [mailto:[EMAIL PROTECTED]
Sent: Monday, May 14, 2007 2:23 AM
To: [email protected]
Subject: Witango-Talk: REGEX question


Ages ago I asked about a REGEX statement to tell whether or not there were
any non-alphanumeric characters in a string. I've been using this since:

<@if "<@numrows array='<@REGEX EXPR="[^A-Za-z0-9\/:-.]+" STR="@@local$strng"
TYPE="E" position="all">'>>0">
String entered contains non-alphnumeric characters....
<@ASSIGN NAME=CheckPN VALUE=BAD SCOPE=LOCAL>
<@else>
String entered is ok
<@ASSIGN NAME=CheckPN VALUE=GOOD SCOPE=LOCAL>
</@if>

But I noticed to day that it doesn't recognise '?'

STR="abcd889?4576"  Passes

As does "????????"

Can anyone explain why and tell me how I can get around this?

I assume ??? Is considered a wildcard?

Wayne

                  Byte Services Pty Ltd
               http://www.byteserve.com.au/
                  [EMAIL PROTECTED]
   Ph 02 9960 6099   Mob 0409 960 609   Fax 02 9960 6088

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

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

Reply via email to