From 8a4a15a5a2096bb94012538041471fb81ec873fb Mon Sep 17 00:00:00 2001 From: gorhill Date: Sat, 7 Sep 2013 16:04:25 -0400 Subject: [PATCH] restrict week number to valid values --- cronexpr_impl.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cronexpr_impl.go b/cronexpr_impl.go index 51f2cc1..981aa0e 100644 --- a/cronexpr_impl.go +++ b/cronexpr_impl.go @@ -188,7 +188,7 @@ var ( layoutWorkdom = `^(%value%)w$` layoutLastWorkdom = `^lw$` layoutDowOfLastWeek = `^(%value%)l$` - layoutDowOfSpecificWeek = `^(%value%)#(\d+)$` + layoutDowOfSpecificWeek = `^(%value%)#([1-5])$` fieldFinder = regexp.MustCompile(`\S+`) entryFinder = regexp.MustCompile(`[^,]+`) layoutRegexp = make(map[string]*regexp.Regexp)