added ltrim() before the regex to allow space/newline before front matter tag