JSFiddle - React, Tailwind, and code Playground

JavaScript

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