From bdb19f681e3a0296fb90e1afe78e6d65e61b1d8e Mon Sep 17 00:00:00 2001 From: joaquinelio Date: Sun, 17 Jan 2021 20:00:35 -0300 Subject: [PATCH] too wordy explanation --- .../13-regexp-alternation/03-match-quoted-string/solution.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/9-regular-expressions/13-regexp-alternation/03-match-quoted-string/solution.md b/9-regular-expressions/13-regexp-alternation/03-match-quoted-string/solution.md index 5a007aee..2749f3ff 100644 --- a/9-regular-expressions/13-regexp-alternation/03-match-quoted-string/solution.md +++ b/9-regular-expressions/13-regexp-alternation/03-match-quoted-string/solution.md @@ -3,7 +3,7 @@ The solution: `pattern:/"(\\.|[^"\\])*"/g`. Step by step: - First we look for an opening quote `pattern:"` -- Then if we have a backslash `pattern:\\` (we technically have to double it in the pattern, because it is a special character, so that's a single backslash in fact), then any character is fine after it (a dot). +- Then if we have a backslash `pattern:\\` (we have to double it in the pattern because it is a special character), then any character is fine after it (a dot). - Otherwise we take any character except a quote (that would mean the end of the string) and a backslash (to prevent lonely backslashes, the backslash is only used with some other symbol after it): `pattern:[^"\\]` - ...And so on till the closing quote.