Javascript String matchAndGet(str)
String.prototype.matchAndGet = function (str) { var result = this.match(str) if (result) return result[1] return ''; }