note 70521 deleted from function.ereg-replace by tularis

From: Date: Thu, 19 Oct 2006 15:23:20 +0000
Subject: note 70521 deleted from function.ereg-replace by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-118773@lists.php.net to get a copy of this message
Note Submitter: steve at stevewinner dot com Reason: useless ---- <?php $string="This, is: a' stri%ng\" \\ with lots% of ()punt*uation@!#^>!-_+=}{|/;`~><.,?&^ "; // strips a string of all punctuation $newString= trim(ereg_replace('[^A-Za-z0-9[:space:]]', '', $string)); // strips all punctuation except double quotes (usefull for search strings that may use google style double quotes to search for exact occurences. $newString= trim(ereg_replace('[^A-Za-z0-9"[:space:]]', '', $string)); ?>

« previous php.notes (#118773) next »