const regex = /free(co+de)camp.*free(co+de)camp/i;
console.log(regex.test(“freecooooodecamp is great i love freecooooodecamp”)); // true
console.log(regex.test(“freecooooodecamp is great i love freecodecamp”)); // false
I discovered an error in the transcript; the second console log output a true result. Furthermore, the lecture video (3:18) has a different code snippet compared to the transcript.
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36
It would be great if you can report this to help make FCC better. Bugs can be reported as GitHub Issues. Whenever reporting a bug, please check first that there isn’t already an issue for it and provide as much detail as possible.