By helping me translate a perl module to JavaScript, or at least recommending a similar JS library:
http://cpansearch.perl.org/src/SHAY/Text-Balanced-2.03/lib/T..._match_bracketed sub is the one i'm having trouble with. Understanding how best to translate pos.