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 运行时(意外量词)错误。
表达式是——^[0-9]+(\.[0-9]{1,3})?${1,3}
^[0-9]+(\.[0-9]{1,3})?${1,3}
我正在尝试验证一个最多包含 3 位小数的数字。
谁能看到这有什么问题?
{1,3}删除表达式末尾的多余部分:
{1,3}
^[0-9]+(.[0-9]{1,3})?$