I have some javascript code that i would like to minify using regex.
My goal is to turn this:
function mFunct(variable){
var a, b, c;
new Class();
}
Into this:
function mFunct(variable){var a,b,c;new Class();}
I have tried this regular expression:
(?:(new|var|function)\s)|\s
but it selects var a
from the javascript code, which contains a crucial whitespace.
How can I change the regular expression so that it doesn't select it?