Difference between regex [A-z] and [a-zA-Z]

后端 未结 6 1875
北海茫月
北海茫月 2020-11-22 08:39

I am using a regex to program an input validator for a text box where I only want alphabetical characters. I was wondering if [A-z] and [a-zA-Z] we

6条回答
  •  旧时难觅i
    2020-11-22 09:34

    The a-z matchs 'a' to 'z' A-Z matchs 'A' to 'Z' A-z matches all these as well as the characters between the 'Z' and 'a' which are [ ] ^ / _ `

    Refer to http://www.asciitable.com/

提交回复
热议问题