<p dir="auto">Challenge <a href="http://freecodecamp.com/challenges/waypoint-sift-through-text-with-regular-expressions" rel="nofollow">http://freecodecamp.com/challenges/waypoint-sift-through-text-with-regular-expressions</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p>
<p dir="auto">In the description, <code class="notranslate">/the+/gi</code> is used to search for all "the" and "The" in a string. While stated differently, I would consider the <code class="notranslate">+</code> being part of the pattern. As I understand it, the <code class="notranslate">+</code> will only affect the character or group directly in front of it (as do <code class="notranslate">*</code>, <code class="notranslate">?</code> and <code class="notranslate">{}</code>), so in the example <code class="notranslate">e</code> (will also match a "theeee"), which is probably not what the author wanted. Even worse, the assertions want me to write <code class="notranslate">/and+/gi</code>, where <code class="notranslate">/and/gi</code> would be sufficient and less misleading.</p>
<p dir="auto">These extra plusses won't change anything if you just count matches, as these words cannot overlap (example if they did: <code class="notranslate">"abaaba".match(/aba+/gi)</code> will return only one match, <code class="notranslate">"abaaba".match(/aba/gi)</code> will return two), but might change results if you evaluate the whole matches for example for total length.</p>
<p dir="auto">I also do not quite agree with the description of the "g" flag, though I would not call that false, just imprecise. I would describe it as "After finding a pattern match, continue search after that match, so that the found patterns cannot overlap" or similar, to make clear that without the "g" flag, only the first match is returned.</p>
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-sift-through-text-with-regular-expressions" rel="nofollow">http://www.freecodecamp.com/challenges/waypoint-sift-through-text-with-regular-expressions</a> has an issue.</p>
<p dir="auto">The challenge is to search a string of text for occurrences of the word 'and'.</p>
<p dir="auto">But currently the challenge requires the RegEx <code class="notranslate">/and+/gi</code> which is incorrect due to allowing 1 or more 'd's. This pattern would match and, anddddd, anddddddddd, etc.</p>
<p dir="auto">The challenge currently rejects the correct RegEx <code class="notranslate">/and/gi</code>.</p>