regex returns the index of the match, not a boolean