http://www.perlmonks.org?node_id=117113


in reply to How do I match/extract a function from a JavaScript file?

be sure to show your work.
:P
eh? wot? oh, alright. You probably want to look at Text::Balanced for any serious answer, otherwise perlre can assist you.