Defect fix for regex duplicate check

Defect fix for regex duplicate check