From 6cd3466f0be97b214654827eaa4391a406536e6d Mon Sep 17 00:00:00 2001 From: hilliarj Date: Thu, 28 Feb 2019 16:33:07 -0500 Subject: [PATCH] fix(curriculum): Find Characters with Lazy Matching (#35454) * fix(curriculum): Find Characters with Lazy Matching * Update PR Note is moved in the Description section and not the Instructions section --- .../find-characters-with-lazy-matching.english.md | 1 + 1 file changed, 1 insertion(+) diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/regular-expressions/find-characters-with-lazy-matching.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/regular-expressions/find-characters-with-lazy-matching.english.md index 78d8b8c149..a22cb3536a 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/regular-expressions/find-characters-with-lazy-matching.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/regular-expressions/find-characters-with-lazy-matching.english.md @@ -10,6 +10,7 @@ In regular expressions, a greedy match finds the longest possible p You can apply the regex /t[a-z]*i/ to the string "titanic". This regex is basically a pattern that starts with t, ends with i, and has some letters in between. Regular expressions are by default greedy, so the match would return ["titani"]. It finds the largest sub-string possible to fit the pattern. However, you can use the ? character to change it to lazy matching. "titanic" matched against the adjusted regex of /t[a-z]*?i/ returns ["ti"]. +Note
Parsing HTML with regular expressions should be avoided, but pattern matching an HTML string with regular expressions is completely fine. ## Instructions