Perform a regular expression match on a string instead of a Buffer.