Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 48436d1

Browse files
committedDec 19, 2024·
Use string interpolation in 2024 day 19 part 1
$ needed to be escaped.
1 parent 0e4fe48 commit 48436d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/main/scala/eu/sim642/adventofcode2024/Day19.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ object Day19 {
1111

1212
def patternsRegex(patterns: Seq[Towel]): Regex = {
1313
val one = patterns.mkString("|")
14-
("^(" + one + ")*$").r // TODO: why s"..." doesn't work?
14+
s"^($one)*$$".r
1515
}
1616

1717
def countPossibleDesigns(input: Input): Int = {

0 commit comments

Comments
 (0)
Please sign in to comment.