From 935ed8580ea7321145c1339d8e05d374db28645e Mon Sep 17 00:00:00 2001 From: Vse Mozhe Buty Date: Tue, 8 Dec 2020 00:03:41 +0200 Subject: [PATCH] Fix typo in 9.7 (Escaping, special characters) --- 9-regular-expressions/07-regexp-escaping/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/9-regular-expressions/07-regexp-escaping/article.md b/9-regular-expressions/07-regexp-escaping/article.md index 7bf98947..eed76791 100644 --- a/9-regular-expressions/07-regexp-escaping/article.md +++ b/9-regular-expressions/07-regexp-escaping/article.md @@ -96,4 +96,4 @@ alert( "Chapter 5.1".match(regexp) ); // 5.1 - To search for special characters `pattern:[ \ ^ $ . | ? * + ( )` literally, we need to prepend them with a backslash `\` ("escape them"). - We also need to escape `/` if we're inside `pattern:/.../` (but not inside `new RegExp`). -- When passing a string `new RegExp`, we need to double backslashes `\\`, cause string quotes consume one of them. +- When passing a string to `new RegExp`, we need to double backslashes `\\`, cause string quotes consume one of them.