RegExp = function RegExp(str){ this.flag = false; debugger; if(str== `\\w+ *\\(\\) *{\\w+ *['|"].+['|"];? *}`){ this.flag =true; } }; RegExp.prototype.test = function test(str){ this.flag; if (this.flag){ debugger return true; } }; var _0x1037b7 = { 'removeCookie': function() { return 'dev'; } }; var _0x3825a3 = function() { var _0x4723ee = new RegExp('\\w+ *\\(\\) *{\\w+ *[\'|"].+[\'|"];? *}'); return _0x4723ee['test'](_0x1037b7['removeCookie']['toString']()); }; _0x1037b7['updateCookie'] = _0x3825a3; var _0x33a47e = ''; var _0x158ccc = _0x1037b7['updateCookie'](); console.log(_0x158ccc);
标签:function,格式化,检测,代码,return,flag,var,RegExp,0x1037b7 From: https://www.cnblogs.com/angdh/p/17601046.html