From 875ef5e98fc853f94e75b0667495ccd4b8fad8e1 Mon Sep 17 00:00:00 2001 From: Manish Giri Date: Thu, 2 Feb 2017 21:17:16 -0500 Subject: [PATCH] Fix code formatting in regex find characters with lazy matching --- .../regular-expressions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed/challenges/02-javascript-algorithms-and-data-structures/regular-expressions.json b/seed/challenges/02-javascript-algorithms-and-data-structures/regular-expressions.json index a18c1cd3075..c9d6f11eb7e 100644 --- a/seed/challenges/02-javascript-algorithms-and-data-structures/regular-expressions.json +++ b/seed/challenges/02-javascript-algorithms-and-data-structures/regular-expressions.json @@ -413,7 +413,7 @@ "description": [ "In regular expressions, a greedy match finds the longest possible part of a string that fits the regex pattern and returns it as a match. The alternative is called a lazy match, which finds the smallest possible part of the string that satisfies the regex pattern.", "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.", + "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\"].", "
", "Fix the regex /<.*>/ to return the HTML tag <h1> and not the text \"<h1>Winter is coming</h1>\". Remember the wildcard . in a regular expression matches any character."