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
804

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

phpcn_u1582
phpcn_u1582

reply all (3)
阿神

[ab]meansor, one of aorb, representing acharacter set

abmeansand, aandbappear at the same time, and ab iscontinuous.

    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
        About us Disclaimer Sitemap
        php.cn:Public welfare online PHP training,Help PHP learners grow quickly!