Skip to content

Commit

Permalink
refactor: clean regex for day 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Flashky committed Dec 3, 2024
1 parent bad17cf commit 5e9a987
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/adventofcode/flashk/day03/MullItOver.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

public class MullItOver {

private static final Pattern MULTIPLY_PATTERN = Pattern.compile("(mul\\([0-9][0-9]?[0-9]?,[0-9][0-9]?[0-9]?\\))");
private static final Pattern OPERATORS_PATTERN = Pattern.compile("([0-9][0-9]?[0-9]?),([0-9][0-9]?[0-9]?)");
private static final Pattern MULTIPLY_PATTERN = Pattern.compile("(mul\\(\\d*,\\d*\\))");
private static final Pattern OPERATORS_PATTERN = Pattern.compile("(\\d*),(\\d*)");
private static final Pattern IGNORE_MULTIPLICATIONS = Pattern.compile("don't\\(\\).*?do\\(\\)");
private static final String DONT = "don't()";

Expand Down

0 comments on commit 5e9a987

Please sign in to comment.