摘要:
var regex =/^[\d]{4}-((1?[0-2])|(0?[1-9]))-((0?[1-9])|([1-2][\d])|(3[01]))$/; var str = '2017-9-31'; console.log(regex.test(str)); var regex =/^[\d]{4 阅读全文
摘要:
var regex =/^([01]?[\d]|2[0-3]):([0-5]?[\d])$/; var str = '00:00'; console.log(regex.test(str)); var regex =/^([01]?[\d]|2[0-3]):([0-5]?[\d])$/; var s 阅读全文