Regular Expressions - Find One or More Criminals in a Hunt

Tell us what’s happening:
Describe your issue in detail here.
I don’t have any issue, my solution was different is there anything wrong with it?

Your code so far
let reCriminals = /CC*/g;

let reCriminals = /C+/g; // Change this line

Your browser information:

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

Challenge: Regular Expressions - Find One or More Criminals in a Hunt

Link to the challenge:

hi @Abdulrahman1 welcome to the forum
/C+/g; (at least one C)
is same as
/CC*/g; (a C having ZERO or more times C right after it)
which means at least one C

1 Like

thanks a lot, so both work on this challenge.

1 Like

Definitely but C+ is self-explanatory.

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