我正在尝试这个,但是我停滞了。
/\d+$\w+/gi
最佳答案
/^[a-z]{2,}\d*$/i
是:
^ : the begining
[a-z] : a character (a to z), you can add as many allowed characters as you want
{2,} : at least 2 of them
\d* : 0 or more digits
$ : the end
i : ignore case sensetivity (both lowercases and uppercases are allowed)
关于javascript - 使用正则表达式验证userName,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/43810615/