borisyankov/DefinitelyTyped — pull request #3390 by BibbyChung (2014-12-29 16:36:50+00:00)
Title: Updated 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']