JSFiddle - React, Tailwind, and code Playground
HTML
<div style="display: none;">
var ClassB = (function() {
var method = ClassB.prototype;
function ClassB( value ) {
this._value = value;
}
method.getValue = function() {
return this._value;
};
method.setValue = function( value ) {
this._value = value;
};
return ClassB;
})();
</div>
JavaScript
var con = document.querySelector("div").textContent;
var r = /([a-zA-Z$_-][a-zA-Z0-9$_-]*)\._.+/g, m;
while( m = r.exec(con)) {
console.log(m[1] === "this");
}