Fixed regex detection