Re: Remove punctuation
| From: | John Nichel | Date: | Thu, 09 Sep 2004 18:36:39 +0000 |
| Subject: | Re: Remove punctuation | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-196239@lists.php.net to get a copy of this message | ||
Jed R. Brubaker wrote:
Hi all! I am creating a function that will remove punctuation from a string, however, I am wondering if PHP has a function somewhere that will do the same. Right now my approach is to cycle through an array of punctuation and remove the items. Anything already exist? Thanks!You don't have to cycle through an array... preg_replace ( "/[\.,\";'\:]/", "", $string ) -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 john@kegworks.com