I have trouble understanding this challenge. Could someone explain to me how should I write the regex?
// example crowd gathering
let crowd = 'P1P2P3P4P5P6CCCP7P8P9';
let reCriminals = /.c+/ig; // Change this line
let matchedCriminals = crowd.match(reCriminals);
console.log(matchedCriminals);
Browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0.
It will be [C.C*]+
here First C will Search for first C than . will look for another letter so make another letter C and Repeat it.Finally contain whole word with +