diff --git a/2/1/main.go b/2/1/main.go index 286fbde..312dbc0 100644 --- a/2/1/main.go +++ b/2/1/main.go @@ -40,7 +40,7 @@ func main() { passwords := []*password{} - inputRegex := regexp.MustCompile(`(?m)^(\d+)-(\d+) (\w): (\w+)$`) + inputRegex := regexp.MustCompile(`^(\d+)-(\d+) (\w): (\w+)$`) scanner := bufio.NewScanner(file) for scanner.Scan() { diff --git a/2/2/main.go b/2/2/main.go index 9c5b1c2..e3096c5 100644 --- a/2/2/main.go +++ b/2/2/main.go @@ -33,7 +33,7 @@ func main() { passwords := []*password{} - inputRegex := regexp.MustCompile(`(?m)^(\d+)-(\d+) (\w): (\w+)$`) + inputRegex := regexp.MustCompile(`^(\d+)-(\d+) (\w): (\w+)$`) scanner := bufio.NewScanner(file) for scanner.Scan() {