Fix regex
This commit is contained in:
parent
0f9f2f6013
commit
b89205fdc6
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
Reference in New Issue