note 77505 deleted from function.preg-replace by felipe

From: Date: Mon, 10 Dec 2007 02:15:42 +0000
Subject: note 77505 deleted from function.preg-replace by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-133098@lists.php.net to get a copy of this message
Note Submitter: robert at codehelpers dot com ---- If you're wanting to strip a variety of timestamps, try this: <?php $var = "[09:21:32] Testing"; $var = preg_replace('/\W*\d+:\d+(?::\d+)?[a-zA-Z]*[\W\s]*/', '', $var); echo $var; ?> Hope this helps :)

« previous php.notes (#133098) next »