This commit is contained in:
John Chilton
2018-05-02 12:01:02 -04:00
parent b84de1e82b
commit db8d7e65fe
@@ -36,12 +36,11 @@ const applyRegex = function(regex, target, data, replacement, groupCount) {
function newRow(row) {
const source = row[target];
const match = regExp.exec(source);
if (!match) {
failedCount++;
return null;
}
if (!replacement) {
const match = regExp.exec(source);
if (!match) {
failedCount++;
return null;
}
groupCount = groupCount && parseInt(groupCount);
if (groupCount) {
if (match.length != groupCount + 1) {