Is the regular expression [a-Z] valid and if yes then is it the same as [a-zA-Z]?

前端 未结 7 1556
伪装坚强ぢ
伪装坚强ぢ 2020-11-27 07:53

Is the regular expression [a-Z] valid and if yes then is it the same as [a-zA-Z]? Please note that in [a-Z] the a is lowercase and the Z is uppercase.

E

7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-27 08:22

    I'm not sure about other languages' implementations, but in PHP you can do

    "/[a-z]/i"
    

    and it will case insensitive. There is probably something similar for other languages.

提交回复
热议问题