-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathCron_Interval.regex.txt
61 lines (61 loc) · 2.45 KB
/
Cron_Interval.regex.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Matches a Cron interval
(?<Minute>(?>
(?<Any>\*) # An asterisk
| # or
(?<Start>
(?>[0-5][0-9]|[0-4]\d|\d{1,1}) # A number between 0 and 59
)
(?<End>
\- # a dash
(?>[0-5][0-9]|[0-4]\d|\d{1,1}) # followed by another number between 0 and 59
){0,1}
(?<Or>\,){0,1} # followed by an optional comma (which indicates 'or')
)){1,}\s # A space
(?<Hour>(?>
(?<Any>\*) # An asterisk
| # or
(?<Start>
(?>[0-2][0-3]|[0-1]\d|\d{1,1}) # A number between 0 and 23
)
(?<End>
\- # a dash
(?>[0-2][0-3]|[0-1]\d|\d{1,1}) # followed by another number between 0 and 23
){0,1}
(?<Or>\,){0,1} # followed by an optional comma (which indicates 'or')
)){1,}\s # A space
(?<Day>(?>
(?<Any>\*) # An asterisk
| # or
(?<Start>
(?>3[0-1]|[0-2][1-9]|[1-9]) # A number between 1 and 31
)
(?<End>
\- # a dash
(?>3[0-1]|[0-2][1-9]|[1-9]) # followed by another number between 1 and 31
){0,1}
(?<Or>\,){0,1} # followed by an optional comma (which indicates 'or')
)){1,}\s # A space
(?<Month>(?>
(?<Any>\*) # An asterisk
| # or
(?<Start>
(?>1[0-2]|[1-9]) # A number between 1 and 12
)
(?<End>
\- # a dash
(?>1[0-2]|[1-9]) # followed by another number between 1 and 12
){0,1}
(?<Or>\,){0,1} # followed by an optional comma (which indicates 'or')
)){1,}\s # A space
(?<DayOfWeek>(?>
(?<Any>\*) # An asterisk
| # or
(?<Start>
(?>[0-6]) # A number between 0 and 6
)
(?<End>
\- # a dash
(?>[0-6]) # followed by another number between 0 and 6
){0,1}
(?<Or>\,){0,1} # followed by an optional comma (which indicates 'or')
)){1,}