Skip to content

Commit

Permalink
Merge pull request #237 from Tommi2Day/fix/issue235
Browse files Browse the repository at this point in the history
Update Range Check regexp
  • Loading branch information
atc0005 authored Jan 25, 2024
2 parents 38f7549 + b63ceca commit 85157e2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions range.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ func ParseRangeString(input string) *Range {
r := Range{}

digitOrInfinity := regexp.MustCompile(`[\d~]`)
optionalInvertAndRange := regexp.MustCompile(`^\@?((?:[-+]?[\d\.]+)(?:e(?:[-+]?[\d\.]+))?|~)?(:((?:[-+]?[\d\.]+)(?:e(?:[-+]?[\d\.]+))?)?)?$`)
firstHalfOfRange := regexp.MustCompile(`^((?:[-+]?[\d\.]+)(?:e(?:[-+]?[\d\.]+))?)?:`)
endOfRange := regexp.MustCompile(`^(?:[-+]?[\d\.]+)(?:e(?:[-+]?[\d\.]+))?$`)
optionalInvertAndRange := regexp.MustCompile(`^@?([-+]?[\d.]+(?:e[-+]?[\d.]+)?|~)?(:([-+]?[\d.]+(?:e[-+]?[\d.]+)?)?)?$`)
firstHalfOfRange := regexp.MustCompile(`^([-+]?[\d.]+(?:e[-+]?[\d.]+)?)?:`)
endOfRange := regexp.MustCompile(`^[-+]?[\d.]+(?:e[-+]?[\d.]+)?$`)

r.Start = 0
r.StartInfinity = false
Expand Down

0 comments on commit 85157e2

Please sign in to comment.