1
Fork 0

Fix regex

This commit is contained in:
Jan-Lukas Else 2020-12-02 16:50:19 +01:00
parent 0f9f2f6013
commit b89205fdc6
2 changed files with 2 additions and 2 deletions

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

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