Regular expression, How to allow combination of dot (period) and letters?

前端 未结 7 617
庸人自扰
庸人自扰 2020-12-31 08:30

I want to allow (.) and (a-zA-Z) letters and _ and - , I have some problems with the (.) ,

Any idea ?

Thanks in advance ,

Ish

7条回答
  •  清歌不尽
    2020-12-31 09:17

    . Has a special meaning in regular expressions, it uses to denote any character. Therefore you need to use escape character.

    So you need to use \.

提交回复
热议问题