|
Posted by John Dunlop on 07/23/05 17:58
Tim Van Wassenhove wrote:
> #[^a-z0-9_]#
and #2 of the 100 ways to write that expression - probably
*the* most common in c.l.php - involves + optimi[sz]ation
(likely not appreciable though):
#[^a-z0-9_]+#i <- case-insensitive, mind
in at no. 3, the less explicit:
#[^[:alnum:]_]+# //no need for 'i'; can match non-US-ASCIIs
down at number 4, the shorter and even more implicit:
#\W+# //as with 2, can match non-US-ASCIIs, no need for 'i'
they're all different in their own inimitable ways.
--
Jock
Navigation:
[Reply to this message]
|