Within the answer to this task they give the following:
let crowd = “P1P2P3P4P5P6CCCP7P8P9”
I can understand why the rest of the code (regex and other variables) are in here and yes, according to the answer my regex is right anyway, and I thought that the other variables were coded into the task beforehand, hence I didn’t put it in (lesson learnt) but won’t I don’t understand is this “P1P2P3P4P5P6CCCP7P8P9”, where does this come from. Nowhere within the question does it even mention the above or is this one of those FCC mistakes again?
Thanks for your help)
Your code so far
let reCriminals = /C+/ig; // 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/92.0.4515.159 Safari/537.36
the strings in the test text are used by the tests to check if your regex work
this is one of the strings used by the tests, you can see it in the test list
if you find any mistake please report it
EDIT: do you mean in the guide?
it seems it was never updated after the challenge was changed to simplify the code in the editor, I have now updated it
You asked where i got that large string from (the one in question). So i said it is in the answer to this task, what i would like to know is where FCC got this string from and why they are using it. Hope this helps?
They just needed a string to use in the test. They made it up. Any string with some “C” and some “not C” would work. The string means nothing. It looks like some important code, but it’s not. I don’t know what “P1” is supposed to be and it doesn’t matter.
Kevin, if you look at the answer to this challenge you will see it there as a string, this is exactly what um asking, ive looked at the answer because my /C+/ answer doesn’t pass, so I looked at the answer to this question and so that long string is part of the answer, it showd up as the string that we’re “supposed to” use as part of the answer. Im now wondering why FCC gives such a string where it doesn’t actually mention that string within the question, hence my question??? Does this make sense?
Please go look at the answer and youll see what im talking about
You see, when i only use /C+/ as an answer it doesn’t pass so i went to the answer and they give this long string, where they get that from is what id like to know. The question makes no mention of it is, why im confused
I’ve changed the guide, now it is updated. The guide is not official solution, it is maintained by volunteers, we try to keep it as up to date as possible but we may miss stuff. The solution is now up to date and doesn’t include the string anymore.
That string is not why your code is not passing, even in that situation the string was not part of what the tests test. The tests test only the regex.