') comment if we want to wrap # the headmatter in a comment. # # The headmatter is delimited by either '----' or '++++' as per # Markdown/yaml standards. # Technical note that '+' is a regex character so \+{3,} instead of ++++ if (preg_match('/^()?(.*)/ms',$contents, $parts) === true) { $var_dump($parts); }