6 ms·
It's not mentioned explicitly, but the given patterns should match the entire answer, not just part of it. In your screenshot, "O+" means "one or more letters `
by DCoder 12y ago
It's not mentioned explicitly, but the given patterns should match the entire answer, not just part of it. In your screenshot, "O+" means "one or more letters `O`" , it does not mention any `E` s, so OE is not a valid answer.
When you're testing your answers, add explicit start/end anchors and implicit grouping to get better results:
var r = /^(?:HE|LL|O+)$/;
console.log("OE".match(r));
console.log("OO".match(r));