• +91 9723535972
  • info@interviewmaterial.com

Regular Expressions Interview Questions and Answers

Question -
How to count string occurrence in string?



Answer -

var temp = "This is a string.";
var count = (temp.match(/is/g) || []).length;
console.log(count);

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners