borisyankov/DefinitelyTyped — pull request #3387 by BibbyChung (2014-12-28 15:14:50+00:00)
Title: modified xregexp.d.ts

// Matchception: Finding matches within matches, while passing forward and
// returning specific backreferences
html = 'XRegExp' +
'Google';
XRegExp.matchChain(html, [
{regex: //i, backref: 1},
{regex: XRegExp('(?i)^https?://(?[^/?#]+)'), backref: 'domain'}
]);
// -> ['xregexp.com', 'www.google.com']