Update regexes to bind to beginning and end of string

This ensures that multiline strings are properly matched in their
entirety.