I'm working on a large and extremely messy javascript file, and I would like to remove all functions from the file, ultimately creating a version which contains only data.
the code looks something like this:
var foo : bar = "hi";
function foobar (){
//blah blah
}
var fobar:bar;
var barfo:bar;
function imSoUgly(){
//Blah blah blah blah mr freeman
}
The regex I would like to build would find all function.{.} and delete them, producing this:
var foo : bar = "hi";
var fobar:bar;
var barfo:bar;
I'm not quite sure where to start with this. Ideally I would like to do it with Textmate's RegEx, but I'm easy.