小编No *_*ame的帖子

正则表达式特定的重复间隔解析器,大多数工作

我有以下正则表达式:

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))?)?)
Run Code Online (Sandbox Code Playgroud)

这适用于我需要的大部分内容,但不适用于以下字符串...

Every 20th of the month
Run Code Online (Sandbox Code Playgroud)

以下工作很棒......

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
Run Code Online (Sandbox Code Playgroud)

你能帮我吗?谢谢

regex powershell

4
推荐指数
1
解决办法
40
查看次数

标签 统计

powershell ×1

regex ×1