Fixing regex matching method. Misinterpreted the API D: