题解 | #判断是否符合指定格式#
判断是否符合指定格式
https://www.nowcoder.com/practice/eb86f08c478749868a01861f5ddad28b
function matchesPattern(str) {
return /^(\d{3}-){2}\d{4}$/.test(str)
}
判断是否符合指定格式
https://www.nowcoder.com/practice/eb86f08c478749868a01861f5ddad28b
function matchesPattern(str) {
return /^(\d{3}-){2}\d{4}$/.test(str)
}
相关推荐
萨德楽陈:能进去你就是最牛逼的,不会学就完了