我有以下正则表达式:
once|every (?:(?:([1-9][0-9]?[0-9]? )?(hours?|days?))|(?:(?:(?:(1st|2nd|3rd|4th|5th))? ?(monday|tuesday|wednesday|thursday|friday|saturday|sunday)?)|((?:[1-9]|[1-2][0-9]|3[0-1])(?:st|nd|rd|th))) ?(?:(of the month)? ?(?:(?:repeated every )([2-9][0-9]?[0-9]?) (weeks|months))?)?)
这适用于我需要的大部分内容,但不适用于以下字符串…
Every 20th of the month
以下工作很棒……
Once
Every hour
Every day
Every 2 hours
Every 2 days
Every Monday
Every 1st of the month
Every 1st of the month repeated every 3 months
Every 2nd Monday of the month
Every 2nd Monday of the month repeated every 3 months
你能帮我吗?
谢谢