regexp to spec match.