标签: regex
如何检测这样的字符串:
date-2014_10_3/
和
date-2014103/
答案 0 :(得分:1)
你的意思是,
date-\d{4}_?\d{1,2}_?\d{1,2}\/
DEMO
但它不会检查月份,日期或年份。