note 78690 added to function.preg-replace
| From: | SantoshPatnaik at osu1 dot php dot net | Date: | Tue, 23 Oct 2007 18:35:39 +0000 |
| Subject: | note 78690 added to function.preg-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-131664@lists.php.net to get a copy of this message | ||
@giel dot berkers
Use the 'PCRE_DOTALL' ('s') option so that the '.' covers newline
characters:
$code = preg_replace('/\/\*.*\*\//ms', '', $code);
----
Server IP: 69.147.83.197
Probable Submitter: 59.161.66.226
----
Manual Page -- http://www.php.net/manual/en/function.preg-replace.php
Edit -- https://master.php.net/note/edit/78690
Del: integrated -- https://master.php.net/note/delete/78690/integrated
Del: useless -- https://master.php.net/note/delete/78690/useless
Del: bad code -- https://master.php.net/note/delete/78690/bad+code
Del: spam -- https://master.php.net/note/delete/78690/spam
Del: non-english -- https://master.php.net/note/delete/78690/non-english
Del: in docs -- https://master.php.net/note/delete/78690/in+docs
Del: other reasons-- https://master.php.net/note/delete/78690
Reject -- https://master.php.net/note/reject/78690
Search -- https://master.php.net/manage/user-notes.php