有没有办法在 javascript 的正则表达式中包含 if 语句。这种事情:
var regex = /"if followed by [0-9] then match [a-m], else match [n-z]"/i
所以:
"a9" //returns a match
"aa" //doesn't return a match
"na" //returns a match
我希望这是有道理的。
提前致谢
最佳答案
关于javascript - 带 if 语句的正则表达式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36747020/