2 ms·
Given that combined regex, how do you determine which of the routes that went in to it was the one that matched?
by plorkyeran 12y ago
Given that combined regex, how do you determine which of the routes that went in to it was the one that matched?
- baudehlo 12y agoIf it matched the first, match[2] is set. If it matched the second, match[3] is set. Or you use a better regexp library than the default JS one and use named captures.