note 116098 added to function.preg-replace

From: Date: Sun, 09 Nov 2014 13:16:08 +0000
Subject: note 116098 added to function.preg-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-200856@lists.php.net to get a copy of this message
Remove all intermittent multiple blanks from a string: $string = 'The quick brown fox jumped over the lazy dog .'; $string = preg_replace('/ +/',' ', $string) echo $string produces: The quick brown fox jumped over the lazy dog. ---- Server IP: 72.52.91.14 Probable Submitter: 188.107.38.65 ---- Manual Page -- http://php.net/manual/en/function.preg-replace.php Edit -- https://master.php.net/note/edit/116098 Del: integrated -- https://master.php.net/note/delete/116098/integrated Del: useless -- https://master.php.net/note/delete/116098/useless Del: bad code -- https://master.php.net/note/delete/116098/bad+code Del: spam -- https://master.php.net/note/delete/116098/spam Del: non-english -- https://master.php.net/note/delete/116098/non-english Del: in docs -- https://master.php.net/note/delete/116098/in+docs Del: other reasons-- https://master.php.net/note/delete/116098 Reject -- https://master.php.net/note/reject/116098 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#200856) next »