Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我要求正则表达式匹配vbscript中的以下模式
[任何一位数字]和:任何四位数字/
即,左方括号后跟单个数字,后跟右方括号或冒号,后跟四位数字,后跟斜线
我尝试了以下模式,它也只选择一个数字
[\[]*([:]*([0-9]{1,4})[/]*)[]]*
在此先感谢,马丹
试试这样:
(\[\d\]|\:\d{4}\/)
这应该有效:
(\[\d\]|:\d{4}/)