Defect fix for regex duplicate check