I agree with Jesse, keep is probably better. Also, by having the "."
in your regex string, you basically allow anything in there, because
it means "any character".
If you are going to use regex, try EXPR="\W"
\w means: any word character (a-z, A-Z, 0-9, _, and some 8-bit
characters)
\W means: any non-word character (all characters not included by \w,
including carriage returns)
The special w characters above were designed for exactly what you are
looking for.
--
Robert Garcia
President - BigHead Technology
VP Application Development - eventpix.com
13653 West Park Dr
Magalia, Ca 95954
ph: 530.645.4040 x222 fax: 530.645.4040
[EMAIL PROTECTED] - [EMAIL PROTECTED]
http://bighead.net/ - http://eventpix.com/
On May 14, 2007, at 5:55 AM, Jesse Parker wrote:
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
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf