Meta interview question

Check whether a regular expression matches a string.