需要正则表达式

问题描述:

我有一个文本框,需要通过以下方式进行验证:用户应输入字符,然后输入数字.他们不能同时混淆两者.

例如:

用户不应键入a133bv2、232ds等

必须是abc123

请提供相同的正则表达式.

I have a textbox which needs to be validated in such a way that user should enter characters followed by numbers. They cannot mixup both.

For Eg:

User should not be able to type a133bv2,232ds etc

It must be abc123

Please provide the regular expression for the same.

^[a-zA-Z]*[0-9]*




如果需要至少一位数字和至少一个字符,请将"*"替换为"+":



If at least one digit and at least one character is required, replace "*" with "+":

^[a-zA-Z]+[0-9]+





—SA




—SA