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.
我有一个正好十位数的字符串的 javascript 正则表达式模式。
reg =/^\d{10,10}$/;
但我不确定如何修改它,以便它只匹配不以数字 1 开头的字符串
谢谢
你要这个:
^[02-9]\d{9}$
您可以在debuggex上对其进行可视化。