regex - JavaScript: detection of regular expression in source code -


i need parse javascript source code , match regular expressions of regular expression :). first tried regular expression:

(?:\/.*\/) 

but not work if regular expression contains slash, in next source code

while (line.match(/[+*/]/))         line = line.replace(/([+*/])\s(\d+)\s(\d+)/, function (s, op, a, b) {             return operators[op](+a, +b);         }); 

i don`t know how keep possibilities in 1 regular expression. there way match regular expression in javascript source code using regular expressions?


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -