开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜