- var_dump: documentation ( source)
- preg_match: documentation ( source)
<?php
$line = "###FLAG###\r\n###FLAG###";
// no modifiers
preg_match('~###FLAG###.*###FLAG###~', $line, $matches);
var_dump($matches);
// with 's' modifier
preg_match('~###FLAG###.*###FLAG###~s', $line, $matches);
var_dump($matches);