my regular expression is currently:
includes.push\("([^\"\"]*\.js)"\)
but it matches all of the following lines
/*includes.push("javascriptfile.js")*/
/*
includes.push("javascriptfile.js")
*/
includes.push("javascriptfile.js");
includes.push("javascriptfile.js")
And I don't want it to match the lines within comments.
Any regex experts out there got any ideas?
Thanks :o)
Edit I have tested a regex slightly adapted from madgnome. this picks up multiline ones in my test, can you see any problems with it?
includes\.push("([^\"\"]*\.js)")(?!\n**/)
new test is:
/*includes.push("javascriptfile.js")*/
/*
includes.push("javascriptfile.js")
*/
includes.push("javascriptfile.js");
includes.push("javascriptfile.js");
/*includes.push("javascriptfile.js")*/
/*
includes.push("javascriptfile.js")
*/
This includes comments underneath the initial includes strings.