什么是正则表达式“(?:^(?:dont)$)”是什么意思?

时间:2015-03-23 08:10:41

标签: regex regex-negation

我有一个正则表达式

"(?:^(?:dont)$)"
这意味着什么?它可以观看哪种文字模式?

2 个答案:

答案 0 :(得分:0)

/"(?:^(?:dont)$)"/
" matches the characters " literally
(?:^(?:dont)$) Non-capturing group
^ assert position at start of the string
(?:dont) Non-capturing group
dont matches the characters dont literally (case sensitive)
$ assert position at end of the string
" matches the characters " literally

答案 1 :(得分:0)

与往常一样,您可以参考像Regexper这样的正则表达式可视化工具。

svg