<@REGEX EXPR="[[:alnum:]]+" STR="abc5 defgHijklm;no p4qrstuv)0wx,yz"
TYPE="E" position=all>
will return:
abc5 1 4 1
defgHijklm 6 10 2
no 17 2 3
p4qrstuv 20 8 4
0wx 29 3 5
yz 33 2 6
thus:
<@REGEX EXPR="[^[:alnum:]]+" STR="abc5 defgHijklm;no p4qrstuv)0wx,yz"
TYPE="E" position=all>
will return
5 1 1
; 16 1 2
19 1 3
) 28 1 4
, 32 1 5
(If the string in question is alphanumeric the number of rows in the second
array should be zero)...
If I can be of further assistance please contact me.
Fergal
P.S. For further regex examples see
http://developer.witango.com/fergal/regex/
----- Original Message -----
From: "Wayne Irvine" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 21, 2004 11:10 AM
Subject: Witango-Talk: Checking for Alphanumerics
> IS there a simple way to test whether a string contains only alphanumeric
> characters (0-9,a-z,A-Z)?
>
> It's not too hard to write a loop to test each char but if there is
already
> a metatag or regex expression I'd rather not reinvent the wheel.
>
> Wayne Irvine
> 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