题解 | #统计大写字母个数#
统计大写字母个数
http://www.nowcoder.com/practice/434414efe5ea48e5b06ebf2b35434a9c
正则表达式是处理、匹配字符串的强大武器
let str = readline(), reg = /[A-Z]/g
console.log(str.match(reg).length)
统计大写字母个数
http://www.nowcoder.com/practice/434414efe5ea48e5b06ebf2b35434a9c
正则表达式是处理、匹配字符串的强大武器
let str = readline(), reg = /[A-Z]/g
console.log(str.match(reg).length)
相关推荐