There seems to be a mismatch in how unmatched capture groups are treated in the replace function. RE2 sends them to the replacement function as empty string, which makes it hard to distinguish between unmatched pattern and empty capture. Related https://github.com/uhop/node-re2/pull/8.
There seems to be a mismatch in how unmatched capture groups are treated in the replace function. RE2 sends them to the replacement function as empty string, which makes it hard to distinguish between unmatched pattern and empty capture. Related https://github.com/uhop/node-re2/pull/8.