题解 | #子字符串频次#

子字符串频次

http://www.nowcoder.com/practice/053caf9d4d9d449bb45a6b02a572f71b

正则表达式匹配全局出现的字符数组,返回其长度

const _searchStrIndexOf = (str, target) => {
  // 补全代码
  return str.match(new RegExp(target, 'g')).length           
}
全部评论

相关推荐

点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务