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
You’re supposed to utilize the “+” quantifier. I think it gives you an example in the instructions.
My code is this please help
let difficultSpelling = "Mississippi";
let myRegex = /["ss+","ss+"]/ig; // Change this line
let result = difficultSpelling.match(myRegex);
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);
While it passes the test, it misses the point of the exercise. There is no need for the extra s.
Yes you are right.
Exercise doesn’t need that extra s.