Improved regex for API key matching.