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 24, 2024
1 parent 38f7549 commit b63ceca
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 b63ceca

Please sign in to comment.