Simplify and speed up GSMEncoder.can_encode? with Regexp.