The thought behind using test() over exec() was that it's just faster and will hopefully keep a smaller memory footprint. I'm going to be looping over a lot of files to see which ones have front matter so I wanted to make sure the process was a cheap as possible.