From 48436d11e4ef8f31b8503037d96c87c507c44600 Mon Sep 17 00:00:00 2001 From: Simmo Saan Date: Thu, 19 Dec 2024 23:57:20 +0200 Subject: [PATCH] Use string interpolation in 2024 day 19 part 1 $ needed to be escaped. --- src/main/scala/eu/sim642/adventofcode2024/Day19.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/eu/sim642/adventofcode2024/Day19.scala b/src/main/scala/eu/sim642/adventofcode2024/Day19.scala index a7819446..92d8ba4f 100644 --- a/src/main/scala/eu/sim642/adventofcode2024/Day19.scala +++ b/src/main/scala/eu/sim642/adventofcode2024/Day19.scala @@ -11,7 +11,7 @@ object Day19 { def patternsRegex(patterns: Seq[Towel]): Regex = { val one = patterns.mkString("|") - ("^(" + one + ")*$").r // TODO: why s"..." doesn't work? + s"^($one)*$$".r } def countPossibleDesigns(input: Input): Int = {