From 75d541877dabf9e7747f5ebc1db0290f5c07243c Mon Sep 17 00:00:00 2001 From: mtrx Date: Fri, 6 Dec 2024 03:08:30 +0100 Subject: [PATCH] removed unnecessary code --- solutions/03.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solutions/03.ts b/solutions/03.ts index 22a9845..3ec544b 100644 --- a/solutions/03.ts +++ b/solutions/03.ts @@ -26,7 +26,7 @@ class DayThree implements Solvable { public part2(): Solvable { const re = /(mul\([0-9]{1,3},[0-9]{1,3}\)|do\(\)|don\'t\(\))/g - const instructions = this.input.replace('\n', '').trim().matchAll(new RegExp(re)).map(match => match[0]) + const instructions = this.input.matchAll(new RegExp(re)).map(match => match[0]) let active = true let result = 0 for (const inst of instructions) {