开发者

^[A-Za-z][A-Za-z0-9]*$ regular Expression?

开发者 https://www.devze.com 2022-12-10 22:18 出处:网络
The above expression is开发者_StackOverflow中文版 working fine. this expression means first leter should start with characters only not a digit, remaining letters alphanumarics. but it not allow when

The above expression is开发者_StackOverflow中文版 working fine. this expression means first leter should start with characters only not a digit, remaining letters alphanumarics. but it not allow when i give underscore like "s_sasi" it is giving error message can u help me i want to allow the underscore also in that expression thank u


^[A-Za-z][A-Za-z0-9_]*$

or better

^[A-Za-z][\w]*$


Have you tried ^[A-Za-z][_A-Za-z0-9]*$ ?


^[A-Za-z][A-Za-z0-9_]*$


you can try with ^[A-Za-Z](.*) Inputs can be anything starting with an Alphabet.

you can use this site http://www.regexplanet.com/ for verifying your regular expressions regex

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号