|
| 1 | +# full field |
| 2 | +/ |
| 3 | +#### top-level days of month field |
| 4 | +# field, any number of expressions broken by literal comma |
| 5 | +(?: |
| 6 | + ### first unit expression, either range of two units or increment of a single unit |
| 7 | + ## first single day of month unit |
| 8 | + (?: |
| 9 | + (?: |
| 10 | + # number (roughly) between 1-31 |
| 11 | + (?: |
| 12 | + # single digit num from 0-9 OR double digit num whose first digit is between 1 and 3 |
| 13 | + [1-3]? |
| 14 | + [0-9] |
| 15 | + ) |
| 16 | + # followed by zero or one W wildcard (weekday) |
| 17 | + W? |
| 18 | + ) |
| 19 | + | |
| 20 | + # OR ordered combo of L and W wildcards (last weekday of month) |
| 21 | + LW |
| 22 | + | |
| 23 | + # OR standalone wildcard of L (last day of month) or asterisk (any) |
| 24 | + [L*] |
| 25 | + ) |
| 26 | + ## end single day of month unit |
| 27 | + # optional second unit (range) or increment |
| 28 | + (?: |
| 29 | + # range, a literal dash followed by ANOTHER single unit |
| 30 | + (?: |
| 31 | + [-] |
| 32 | + ## second single day of month unit |
| 33 | + (?: |
| 34 | + (?: |
| 35 | + # number (roughly) between 1-31 |
| 36 | + (?: |
| 37 | + # single digit num from 0-9 OR double digit num whose first digit is between 1 and 3 |
| 38 | + [1-3]? |
| 39 | + [0-9] |
| 40 | + ) |
| 41 | + # followed by zero or one W wildcard (weekday) |
| 42 | + W? |
| 43 | + ) |
| 44 | + | |
| 45 | + # OR ordered combo of L and W wildcards (last weekday of month) |
| 46 | + LW |
| 47 | + | |
| 48 | + # OR standalone wildcard of L (last day of month) or asterisk (any) |
| 49 | + [L*] |
| 50 | + ) |
| 51 | + ## end second single day of month unit |
| 52 | + ) |
| 53 | + | |
| 54 | + # OR increment, a literal slash followed by integer increment value |
| 55 | + (?: |
| 56 | + [/] |
| 57 | + [0-9]+ |
| 58 | + ) |
| 59 | + )? |
| 60 | + ### end first unit expression |
| 61 | + (?: |
| 62 | + [,] |
| 63 | + ### second unit expression, either range of two units or increment of a single unit |
| 64 | + ## first single day of month unit |
| 65 | + (?: |
| 66 | + (?: |
| 67 | + # number (roughly) between 1-31 |
| 68 | + (?: |
| 69 | + # single digit num from 0-9 OR double digit num whose first digit is between 1 and 3 |
| 70 | + [1-3]? |
| 71 | + [0-9] |
| 72 | + ) |
| 73 | + # followed by zero or one W wildcard (weekday) |
| 74 | + W? |
| 75 | + ) |
| 76 | + | |
| 77 | + # OR ordered combo of L and W wildcards (last weekday of month) |
| 78 | + LW |
| 79 | + | |
| 80 | + # OR standalone wildcard of L (last day of month) or asterisk (any) |
| 81 | + [L*] |
| 82 | + ) |
| 83 | + ## end single day of month unit |
| 84 | + # optional second unit (range) or increment |
| 85 | + (?: |
| 86 | + # range, a literal dash followed by ANOTHER single unit |
| 87 | + (?: |
| 88 | + [-] |
| 89 | + ## second single day of month unit |
| 90 | + (?: |
| 91 | + (?: |
| 92 | + # number (roughly) between 1-31 |
| 93 | + (?: |
| 94 | + # single digit num from 0-9 OR double digit num whose first digit is between 1 and 3 |
| 95 | + [1-3]? |
| 96 | + [0-9] |
| 97 | + ) |
| 98 | + # followed by zero or one W wildcard (weekday) |
| 99 | + W? |
| 100 | + ) |
| 101 | + | |
| 102 | + # OR ordered combo of L and W wildcards (last weekday of month) |
| 103 | + LW |
| 104 | + | |
| 105 | + # OR standalone wildcard of L (last day of month) or asterisk (any) |
| 106 | + [L*] |
| 107 | + ) |
| 108 | + ## end second single day of month unit |
| 109 | + ) |
| 110 | + | |
| 111 | + # OR increment, a literal slash followed by integer increment value |
| 112 | + (?: |
| 113 | + [/] |
| 114 | + [0-9]+ |
| 115 | + ) |
| 116 | + )? |
| 117 | + ### end second unit expression |
| 118 | + )* |
| 119 | +) |
| 120 | +#### end top-level days of month field |
| 121 | +/x; |
| 122 | + |
| 123 | +# unit expression |
| 124 | +/ |
| 125 | +### unit expression, either range of two units or increment of a single unit |
| 126 | +## first single day of month unit |
| 127 | +(?: |
| 128 | + (?: |
| 129 | + # number (roughly) between 1-31 |
| 130 | + (?: |
| 131 | + # single digit num from 0-9 OR double digit num whose first digit is between 1 and 3 |
| 132 | + [1-3]? |
| 133 | + [0-9] |
| 134 | + ) |
| 135 | + # followed by zero or one W wildcard (weekday) |
| 136 | + W? |
| 137 | + ) |
| 138 | + | |
| 139 | + # OR ordered combo of L and W wildcards (last weekday of month) |
| 140 | + LW |
| 141 | + | |
| 142 | + # OR standalone wildcard of L (last day of month) or asterisk (any) |
| 143 | + [L*] |
| 144 | +) |
| 145 | +## end single day of month unit |
| 146 | +# optional second unit (range) or increment |
| 147 | +(?: |
| 148 | + # range, a literal dash followed by ANOTHER single unit |
| 149 | + (?: |
| 150 | + [-] |
| 151 | + ## second single day of month unit |
| 152 | + (?: |
| 153 | + (?: |
| 154 | + # number (roughly) between 1-31 |
| 155 | + (?: |
| 156 | + # single digit num from 0-9 OR double digit num whose first digit is between 1 and 3 |
| 157 | + [1-3]? |
| 158 | + [0-9] |
| 159 | + ) |
| 160 | + # followed by zero or one W wildcard (weekday) |
| 161 | + W? |
| 162 | + ) |
| 163 | + | |
| 164 | + # OR ordered combo of L and W wildcards (last weekday of month) |
| 165 | + LW |
| 166 | + | |
| 167 | + # OR standalone wildcard of L (last day of month) or asterisk (any) |
| 168 | + [L*] |
| 169 | + ) |
| 170 | + ## end second single day of month unit |
| 171 | + ) |
| 172 | + | |
| 173 | + # OR increment, a literal slash followed by integer increment value |
| 174 | + (?: |
| 175 | + [/] |
| 176 | + [0-9]+ |
| 177 | + ) |
| 178 | +)? |
| 179 | +### end unit expression |
| 180 | +/x; |
| 181 | + |
| 182 | +# single unit |
| 183 | +/ |
| 184 | +## single day of month unit |
| 185 | +(?: |
| 186 | + (?: |
| 187 | + # number (roughly) between 1-31 |
| 188 | + (?: |
| 189 | + # single digit num from 0-9 OR double digit num whose first digit is between 1 and 3 |
| 190 | + [1-3]? |
| 191 | + [0-9] |
| 192 | + ) |
| 193 | + # followed by zero or one W wildcard (weekday) |
| 194 | + W? |
| 195 | + ) |
| 196 | + | |
| 197 | + # OR ordered combo of L and W wildcards (last weekday of month) |
| 198 | + LW |
| 199 | + | |
| 200 | + # OR standalone wildcard of L (last day of month) or asterisk (any) |
| 201 | + [L*] |
| 202 | +) |
| 203 | +## end single day of month unit |
| 204 | +/x; |
0 commit comments