From 38f4a7bfcacfca0bac205491df05eb97a6f8dbb3 Mon Sep 17 00:00:00 2001 From: YNataly Date: Wed, 18 Oct 2017 21:56:37 +0300 Subject: [PATCH] Update article.md string with backslash is "1\\2" "1\2" is 1 and \2 Error: Octal escape sequences are not allowed in strict mode. without strict mode match returns null --- 5-regular-expressions/04-regexp-escaping/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/5-regular-expressions/04-regexp-escaping/article.md b/5-regular-expressions/04-regexp-escaping/article.md index cb7a3eb1..11767c3d 100644 --- a/5-regular-expressions/04-regexp-escaping/article.md +++ b/5-regular-expressions/04-regexp-escaping/article.md @@ -30,7 +30,7 @@ alert( "function g()".match(/g\(\)/) ); // "g()" If we're looking for a backslash `\`, then we should double it: ```js run -alert( "1\2".match(/\\/) ); // '\' +alert( "1\\2".match(/\\/) ); // '\' ``` ## A slash