[英]Regular expression Javascript match letters except one
I am trying to improve my regular expression in order to not match this string when it has a D
in it: 我试图改善我的正则表达式,以便在其中包含D
时不匹配此字符串:
www.google.com/.../DE69619938D1?cl=e
My regex : 我的正则表达式:
(DE)([0-9]{1,12})((?:[ABCUT][0-9]?)?)
?
我想在缺少“ D1”时进行匹配:这就是为什么我放一个?
after this group. 在这个小组之后。 (working) (工作中) D
after the numbers I don't want to match the string and I don't know how to make this without losing the first rule. 但是当数字后面是D
时,我不想匹配字符串,而且我不知道如何在不丢失第一个规则的情况下进行匹配。 尝试这个
(DE)([0-9]{1,12})(?:(?:[ABCUT][0-9]?)|\?)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.