Regular Expressions - Match Characters that Occur One or More Times

I find this really confusing and hoping for some clarity:

For example, /a+/g would find one match in abc and return ["a"]. Because of the +, it would also find a single match in aabc and return ["aa"].

What does this mean by single match? It seems to me that this second example returns a double match, correct?

Summary
let difficultSpelling = "Mississippi";
let myRegex = /change/; // Change this line
let result = difficultSpelling.match(myRegex);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0

Challenge: Regular Expressions - Match Characters that Occur One or More Times

Link to the challenge:

a match is anything (no matter how long) that matches the rule

so /a+/g
would find 2 matches for example in
aa aa

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.