From 8e50d27a28e02152afebee84db11948abbd15502 Mon Sep 17 00:00:00 2001 From: Ashish Tiwari <85329310+tiwariraw@users.noreply.github.com> Date: Sat, 25 Nov 2023 17:56:21 +0530 Subject: [PATCH] Update 12_day_regular_expressions.md There is an extra backslash in line 380: const pattern = /\\bw{4}\b/g; Correction: const pattern = /\bw{4}\b/g; --- 12_Day_Regular_expressions/12_day_regular_expressions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/12_Day_Regular_expressions/12_day_regular_expressions.md b/12_Day_Regular_expressions/12_day_regular_expressions.md index ef83882..84c1a3e 100644 --- a/12_Day_Regular_expressions/12_day_regular_expressions.md +++ b/12_Day_Regular_expressions/12_day_regular_expressions.md @@ -373,11 +373,11 @@ console.log(matches) // ["e-mail", "email", "Email", "E-mail"] ### Quantifier in RegExp -We can specify the length of the substring we look for in a text, using a curly bracket. Let us see, how ot use RegExp quantifiers. Imagine, we are interested in substring that their length are 4 characters +We can specify the length of the substring we look for in a text, using a curly bracket. Let us see, how to use RegExp quantifiers. Imagine, we are interested in substring that their length are 4 characters ```js const txt = 'This regular expression example was made in December 6, 2019.' -const pattern = /\\b\w{4}\b/g // exactly four character words +const pattern = /\b\w{4}\b/g // exactly four character words const matches = txt.match(pattern) console.log(matches) //['This', 'made', '2019'] ```