improved error message for invalid regex options.