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.
任何人请告诉我允许字母作为第一个字母和字母、数字、.(点)、-(连字符)作为剩余字母的正则表达式,最少 2 个字母,最多 15 个字母。
先感谢您..
让我知道这是否适合您:
^[a-zA-Z]([a-zA-Z0-9]|\.|-){1,14}$
如果你对 ASCII 没问题:
^[A-Za-z][-\w.]{1,14}$