Just check the entire string.

Thanks to David Blaikie for the suggestion.