{"size": 305, "ext": "js", "max_stars_repo_path": "Apr2021/returnSubStrInstanceCount.js", "max_stars_repo_name": "rafiq/codeWars", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "Apr2021/returnSubStrInstanceCount.js", "max_issues_repo_name": "rafiq/codeWars", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Apr2021/returnSubStrInstanceCount.js", "max_forks_repo_name": "rafiq/codeWars", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 27.7272727273, "max_line_length": 62, "alphanum_fraction": 0.5967213115}
function solution(fullText, searchText){
    let reg = searchText;
    if (!fullText || fullText.length === 1) return 0;
    return fullText.match(new RegExp(searchText,"gi")).length;
  }

  console.log(
    solution('abcdeb','b'),// 2);
    solution('abc','b'),// 1);
    solution('abbc','bb'),// 1);
  )