diff --git a/curriculum/challenges/english/25-front-end-development/lab-sentence-maker/66c057041df6394ca796bf33.md b/curriculum/challenges/english/25-front-end-development/lab-sentence-maker/66c057041df6394ca796bf33.md index 7c6d225265e..4eb9e74a7a8 100644 --- a/curriculum/challenges/english/25-front-end-development/lab-sentence-maker/66c057041df6394ca796bf33.md +++ b/curriculum/challenges/english/25-front-end-development/lab-sentence-maker/66c057041df6394ca796bf33.md @@ -124,7 +124,7 @@ You should use the correct story format for the first story: `"Once upon a time, ```js const _initialValues = {} for (const name of ['adjective', 'noun', 'noun2', 'place', 'verb', 'adjective2']) { - const match = code.match(new RegExp(String.raw`${name}\s*=\s*('|"|${'`'})(?<${name}>.*)\1;?\s*`)); + const match = code.match(new RegExp(String.raw`${name}\s*=\s*('|"|${'`'})(?<${name}>.*?)\1(?:,|;|\s|$)`, 'm')); _initialValues[name] = match ? match.groups[name] : null; }