Regex to check number starts with '078'

后端 未结 2 1203
说谎
说谎 2021-01-25 15:52

I need to validate a Textbox in my Asp.Net application where the user can enter mobile number and it should starts with 078 and should contain 10 digits.

Sample:

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-25 16:43

    ^078[0-9]{7}$
    

    This is a bit faster than \d if we use only numbers here.

提交回复
热议问题