Jump to content

gazsp

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

gazsp's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. 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.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.