javascript - Regular expression /(\d)(?=(\d{3})+\.)/gIf ?= is changed to ?: Why are the results different?
高洛峰
高洛峰 2017-05-19 10:35:15
0
2
318

I remember? :and? =Almost the same, but? : capture while? =Do not capture

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(2)
黄舟

I don’t know what your needs are. Judging from the title alone, there is not much difference

?=is positive lookahead ?:is not capturing

过去多啦不再A梦

If you check whether it matches, then it will definitely return true, but if you take Full match, the two are different.

To understand the meaning of Lookahead, it matches a position, not the real character

Recommend a website for testing regex
https://regex101.com

Use the two regular expressions and 1333 tests you provided to separate the results

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template