Hi all,
This is my first post and I'm relatively new to regular expressions so please bear with me :-)
I've worked out a regular expression that works correctly in my text editor (TextMate) which is
^(BODY:)((\n?)|(.?))+(-----)
What I'm trying to do is match the string 'BODY:', then everything afterwards including newlines, then the string '-----'. The expression matches exactly what I need in my text editor, but when I use it in PHP as
$body_regexp = "/\r(BODY:)((\n?)|(.?))+(-----)/";
$match = preg_match_all($body_regexp, $file, $matches);
the match for the second sub-expression is always empty.
Can anybody shed some light on this for me please?
Cheers,
Gaz.