multi line regular expression?
| From: | Tim | Date: | Tue, 01 Jul 2003 08:35:45 +0000 |
| Subject: | multi line regular expression? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-153521@lists.php.net to get a copy of this message | ||
hi,
i have a string that contains the following:
$mystring=<<<EOS
(((TITLE)))
*color*
==
this is where the content goes
it can spreed many lines
...
==
EOS;
i'm using this line of code to try and get the content between == and ==
preg_match_all("|==(.+)==|",$mystring,$contents,PREG_PATTERN_ORDER);
now, if i do a print_r($contents); the thing is empty. but if i put the content of my original
variable all on one line (== line 1 _
line 2 _ line 3 _==), it works fine. is there something to get around this one line limit?
Thanks for your time and have a nice day
Tim