Extract YAML front matter from strings