Browse Source

Fix regex

master
Jan-Lukas Else 4 months ago
parent
commit
b89205fdc6
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      2/1/main.go
  2. +1
    -1
      2/2/main.go

+ 1
- 1
2/1/main.go View File

@ -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() {


+ 1
- 1
2/2/main.go View File

@ -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() {


Loading…
Cancel
Save