- description: 正则匹配 ISO8601 duration 时间格式 (PnYnMnDTnHnMnS)
set KEY_DURATION_REG () {
return /^-?P(?=\w*\d)(?:\d+Y|Y)?(?:\d+M|M)?(?:\d+D|D)?(?:T(?:\d+H|H)?(?:\d+M|M)?(?:\d+(?:\\.\d{1,2})?S|S)?)?$/
}
参考文章:
set KEY_DURATION_REG () {
return /^-?P(?=\w*\d)(?:\d+Y|Y)?(?:\d+M|M)?(?:\d+D|D)?(?:T(?:\d+H|H)?(?:\d+M|M)?(?:\d+(?:\\.\d{1,2})?S|S)?)?$/
}
参考文章:
本文标题:匹配 iso string duration 语法(PnYnMn
本文链接:https://www.haomeiwen.com/subject/psboahtx.html
网友评论