let reg = /\.(?!my-class)/; console.log(reg.test('.ng-xxxxx')); console.log(reg.test('\.my-class')); console.log(reg.test('\.notmy-class'));