From 8c333241768ba50eb3f705b3cca714a8606b2fa7 Mon Sep 17 00:00:00 2001 From: Jolka Date: Fri, 6 Dec 2024 14:04:00 +0100 Subject: [PATCH] remove i flag from pattern in example --- .../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