day 17b complete
took a little longer than expected because the regex was picking the '.' up before the numbers and causing it to become a truncated float... this made it 0 and thus the incorrect coordinate value.
This commit is contained in:
@ -94,7 +94,7 @@ func returnContent(path string) *[]int {
|
||||
defer file.Close()
|
||||
|
||||
scanner := bufio.NewScanner(file)
|
||||
regex, _ := regexp.Compile(`[-+]?[.]?[\d]+`)
|
||||
regex, _ := regexp.Compile(`[-+]?[\d]+`)
|
||||
|
||||
strings := []string{}
|
||||
|
||||
|
Reference in New Issue
Block a user