From 0f75670efb33ff8038fc88f49798b416f4f2b865 Mon Sep 17 00:00:00 2001 From: Logiar Date: Fri, 6 Dec 2024 04:33:43 +0000 Subject: [PATCH] Switch to raw string. --- day03.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/day03.kts b/day03.kts index 411af93..7a0b965 100755 --- a/day03.kts +++ b/day03.kts @@ -9,7 +9,7 @@ var doState = true while (scanner.hasNextLine()) { val line = scanner.nextLine() - val regex = Regex("(mul\\((\\d+),(\\d+)\\))|(do\\(\\))|(don't\\(\\))") + val regex = Regex("""(mul\((\d+),(\d+)\))|(do\(\))|(don't\(\))""") val match = regex.findAll(line) for (matchResult in match) { if (matchResult.value == "don't()") {