Why does this regex not work

Tell us what’s happening:
My regex is not fulfilling this test:

Your regex should match three criminals ( CCC ) in the string P1P5P4CCCcP2P6P3 .

Your code so far

let reCriminals = /[a-z]*C+[a-z]*/g; // Change this line

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15

Challenge: Find One or More Criminals in a Hunt

Link to the challenge:

This is my first time attempting to help someone, so I apologize if I’m not clear.
You only need to match the Cs in the string. You don’t need to match anything else.

1 Like

Re-read the instructions for the challenge. The answer is in the instructions, you just have to figure out which character to change.

1 Like

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