From b7b0b7c096525c24c22d80f79448823c747491e7 Mon Sep 17 00:00:00 2001 From: jolka-ef <94794622+jolka-ef@users.noreply.github.com> Date: Fri, 6 Dec 2024 23:46:12 +0100 Subject: [PATCH] remove i flag from pattern in example (#37119) --- .../javascript/reference/regular_expressions/modifier/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/javascript/reference/regular_expressions/modifier/index.md b/files/en-us/web/javascript/reference/regular_expressions/modifier/index.md index f1c8fc8fa77a055..2df6507705987ee 100644 --- a/files/en-us/web/javascript/reference/regular_expressions/modifier/index.md +++ b/files/en-us/web/javascript/reference/regular_expressions/modifier/index.md @@ -85,7 +85,7 @@ pattern.test(input2); // false Imagine you are finding all variable declarations called `foo` or `bar` (because they are bad names). The word may appear in any case, but you know the keyword is always lowercase, so you can do this: ```js -const pattern = /(?:var|let|const) (?i:foo|bar)\b/i; +const pattern = /(?:var|let|const) (?i:foo|bar)\b/; pattern.test("let foo;"); // true pattern.test("const BAR = 1;"); // true