Skip to content

Commit

Permalink
more precise regex to match intervals
Browse files Browse the repository at this point in the history
  • Loading branch information
pitluga committed Jan 6, 2016
1 parent 0f1395f commit 5b5556b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pattern.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func parseField(field string) FieldMatcher {
if err != nil {
panic("invalid hardcoded regexp!")
}
intervalRegexp, err := regexp.Compile(`\A.*/\d+\z`)
intervalRegexp, err := regexp.Compile(`\A(\*|\d+\-\d+)/\d+\z`)
if err != nil {
panic("invalid hardcoded regexp!")
}
Expand Down

0 comments on commit 5b5556b

Please sign in to comment.