mirror of
https://github.com/InsanusMokrassar/krontab.git
synced 2024-11-22 08:13:54 +00:00
Update 'src/commonMain/kotlin/com/github/insanusmokrassar/krontab/utils/CronRegularExpression.kt'
This commit is contained in:
parent
d1af60feb1
commit
8a596b2e47
@ -1,7 +1,12 @@
|
||||
package com.github.insanusmokrassar.krontab.utils
|
||||
|
||||
internal val monthsRegex = Regex("[*]|(((1[01]?)|(\\d))(,((1[10]?)|(\\d))){0,10})")
|
||||
internal val dayOfMonthRegex = Regex("[*]|(((30?)|([012]?\\d))(,((30?)|([012]?\\d))){0,29})")
|
||||
internal val hoursRegex = Regex("[*]|(((2[0123]?)|([01]?\\d))(,((2[0123]?)|([01]?\\d))){0,23})")
|
||||
internal val minutesRegex = Regex("[*]|(([012345]?\\d)(,([012345]?\\d)){0,59})")
|
||||
internal val monthNumberRegex = Regex("(1[01]?)|(\\d)")
|
||||
internal val dayOfMonthNumberRegex = Regex("(30?)|([012]?\\d)")
|
||||
internal val hoursNumberRegex = Regex("(2[0123]?)|([01]?\\d)")
|
||||
internal val minutesOrSecondsNumberRegex = Regex("[012345]?\\d")
|
||||
|
||||
internal val monthRegex = Regex("[*]|((${monthNumberRegex.pattern})(,(${monthNumberRegex.pattern})){0,10})")
|
||||
internal val dayOfMonthRegex = Regex("[*]|((${dayOfMonthNumberRegex.pattern})(,(${dayOfMonthNumberRegex.pattern})){0,29})")
|
||||
internal val hoursRegex = Regex("[*]|((${hoursNumberRegex.pattern})(,(${hoursNumberRegex.pattern})){0,23})")
|
||||
internal val minutesRegex = Regex("[*]|((${minutesOrSecondsNumberRegex.pattern})(,(${minutesOrSecondsNumberRegex.pattern})){0,59})")
|
||||
internal val secondsRegex = minutesRegex
|
||||
|
Loading…
Reference in New Issue
Block a user