note 75138 deleted from function.preg-match by nlopess
| From: | nlopess@php.net | Date: | Tue, 15 May 2007 13:48:43 +0000 |
| Subject: | note 75138 deleted from function.preg-match by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-126611@lists.php.net to get a copy of this message | ||
Note Submitter: arkin at REMOVE-NOSPAM dot clanbox dot net
----
legolas558;
You must add /mi to your parameters so it matches multi-line, otherwise it won't match.
<?php
// additional spacing added not to confuse markup highlighters
preg_match_all('/<\\?'.'php.*\\?'.'>/mi', $content, $m);
?>
(This regex matches all php parts to a string/file)