[TxMt] Better JavaScript functions

Michael Sheets mummer at whitefalls.org
Sun Sep 18 16:07:28 UTC 2005


> (var) this.functionName = function(arguments) { ... }

Knowing nothing of javascript... if there are parens around var you  
didn't include them in the regex.

On matching the contents of the parens you can also use a non-greedy  
match:

\\((.*?)\\)

Yours of course will work fine, I just wish I'd figured out non- 
greedy matches faster when I was learning ;)



More information about the textmate mailing list