Link Search Menu Expand Document

Match Characters that Occur One or More Times

Summary

  • The + character is used to match a character that occurs consecutively.

Final Code

let difficultSpelling = "Mississippi";
let myRegex = /s+/gi; // Change this line
let result = difficultSpelling.match(myRegex);