Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试编写一个正则表达式,其中:
到目前为止我所拥有的是:
^[a-zA-Z][0,31]+$
但我不确定这是否正确。
这应该有效:
/^[a-z][a-z0-9]{0,31}$/i
^
$
[a-z]
[a-z0-9]{,31}
i