note 59535 deleted from function.preg-match-all by felipe

From: Date: Sun, 23 Mar 2008 22:58:04 +0000
Subject: note 59535 deleted from function.preg-match-all by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-137389@lists.php.net to get a copy of this message
Note Submitter: php at projectjj dot com ---- If you want to get a string with all the 'normal' characters, this may be better: $clean = preg_replace('/\W+/', '', $dirty); \W is the opposite of \w and will match any character that is not a letter or digit or the underscore character, plus it respects the current locale. Use [^0-9a-zA-Z_]+ instead of \W if you need ASCII-only.

« previous php.notes (#137389) next »