javascript - What is the difference between regular expressions written inside square brackets and written outside?
phpcn_u1582
phpcn_u1582 2017-06-26 10:52:47
0
3
874

For example, what is the difference between [\s] and \s?

phpcn_u1582
phpcn_u1582

reply all(3)
阿神

[ab] means or , one of a or b, representing a character set

ab means and , a and b appear at the same time, and ab is continuous.

typecho

Do you have to ask this kind of question? Do you understand that Baidu can take 5 minutes?

刘奇

There is no difference between

[s] and s. They both represent space characters

[abc] As long as one of abc appears
abc must be three consecutive abcs

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