Use regexp to match commands.