Skip to content

Commit

Permalink
update range check regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
Tommi2Day committed Jan 16, 2024
1 parent 7a6e921 commit 80e2a06
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 @@ -79,9 +79,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 80e2a06

Please sign in to comment.