Skip to content

Commit

Permalink
Use string interpolation in 2024 day 19 part 1
Browse files Browse the repository at this point in the history
$ needed to be escaped.
  • Loading branch information
sim642 committed Dec 19, 2024
1 parent 0e4fe48 commit 48436d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/scala/eu/sim642/adventofcode2024/Day19.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 48436d1

Please sign in to comment.