note 49473 deleted from function.preg-replace by didou

From: Date: Mon, 17 Apr 2006 13:47:54 +0000
Subject: note 49473 deleted from function.preg-replace by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-108341@lists.php.net to get a copy of this message
Note Submitter: levi at kodern dot com ---- It took me a couple hours to figure this one out as I'm a newbie at regular expressions, and no one had posted about it. This will remove the parentheses and all any characters inside of them. i.e. phone number with parentheses or Yahoo's news feed. preg_replace(" (\(.*?\))", "", $string)

« previous php.notes (#108341) next »