首页 新闻 赞助 找找看

js正则/^(?:).*$/, (?: )是什么意思啊

0
[已关闭问题] 关闭于 2016-12-14 15:46

js正则/^(?:).*$/, (?: )是什么意思啊

小精灵儿Pawn的主页 小精灵儿Pawn | 菜鸟二级 | 园豆:470
提问于:2016-10-09 11:47
< >
分享
所有回答(3)
0

在JS中这个不完整吧 参考 http://www.cnblogs.com/qiuwuyu/archive/2011/02/28/1966674.html

2012 | 园豆:21228 (高人七级) | 2016-10-09 13:31
0

这个正则表达式匹配的是以?:开头的字符串。

():将( 和 ) 之间的表达式定义为“组”(group),并且将匹配这个表达式的字符保存到一个临时区域(一个正则表达式中最多可以保存9个),它们可以用 \1 到\9 的符号来引用。

就是说你可以在后面通过$1或者\1来表示?: 这俩字符。

刘冰0117 | 园豆:102 (初学一级) | 2016-10-10 11:22
0
^(?:).*$

Assert position at the beginning of the string «^»
Match the regular expression below «(?:)»
Match any single character that is not a line break character «.*»
   Between zero and unlimited times, as many times as possible, giving back as needed (greedy) «*»
Assert position at the end of the string (or before the line break at the end of the string, if any) «$»


Created with RegexBuddy

 

 

学习正则的话还是装个 RegexBuddy 吧

OpportunityLiu | 园豆:255 (菜鸟二级) | 2016-10-10 16:03
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册