Match Characters that Occur One or More Times help

Match Characters that Occur One or More Times help
0

#1

Tell us what’s happening:
Please correct this

Your code so far


let difficultSpelling = "Mississippi";
let myRegex = /["ss","ss"]/ig; // Change this line
let result = difficultSpelling.match(myRegex);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/regular-expressions/match-characters-that-occur-one-or-more-times


#2

You’re supposed to utilize the “+” quantifier. I think it gives you an example in the instructions.


#3

My code is this please help

let difficultSpelling = "Mississippi";
let myRegex = /["ss+","ss+"]/ig; // Change this line
let result = difficultSpelling.match(myRegex);

#4

You need not use the quotes for that and even brackets.
Just put your character between backslashes.
Try doing it now.

Answer is as follows;

let difficultSpelling = “Mississippi”;
let myRegex = /ss+/ig; // Change this line
let result = difficultSpelling.match(myRegex);


#5

While it passes the test, it misses the point of the exercise. There is no need for the extra s.


#6

Yes you are right.
Exercise doesn’t need that extra s.