Fix regex to correctly ignore YAML front matter