Fix pointer error in whole_string_match_regex.

Code should look for dollar at end of pattern, not end of text.
@batrick please review