PCRE Multiline modifier
| From: | _lallous | Date: | Mon, 27 Aug 2001 14:43:08 +0000 |
| Subject: | PCRE Multiline modifier | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-64631@lists.php.net to get a copy of this message | ||
<pre>
<?
$mem = "<pre>hello world\nI love you all!</pre>";
$re = "/<pre>(.+?)<\\/pre>/im";
preg_match_all($re, $mem, $match);
var_dump($match);
?>
</pre>
and the output is:
array(2) {
[0]=>
array(0) {
}
[1]=>
array(0) {
}
}
if i remove the \n in the $mem var everything works okay.