[thelist] any non-alphanumeric character except space
Seth Thomas Rasmussen
seth at sethrasmussen.com
Thu Jul 15 17:10:31 CDT 2004
-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org]On Behalf Of PeterV
Sent: Thursday, July 15, 2004 4:21 PM
To: thelist at lists.evolt.org
Subject: [thelist] any non-alphanumeric character except space
I am trying to do a regex that matches any non-alphanumeric character
except space. Any suggestions? This one [^[:alnum:]+] matches any
non-alphanumeric character including spaces. So it's almost there...
Thanks!
Peter
----------------------------------
Are the outer brackets referencing the start and end of your pattern, or a
character set IN the pattern?
Either way, I think you are confused. [:alnum:] MATCHES alphanumeric
characters(A-Z,a-z,0-9), not the other way around. I am new to RegExp's, but
if you wanted to match non-alphanumeric characters wouldn't you be left
essentially with what [:punct:] covers? Perhaps [:cntrl:] as well.
--
* * Please support the community that supports you. * *
http://evolt.org/help_support_evolt/
For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !
More information about the thelist
mailing list