/(?i:Hello) world/;Modifier: (?ims-ims:...) / notebook
Modifier: (?ims-ims:...)
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
/Hello (?-i:world)/i;const pattern = /(?-m:^)---\n^title:.*^slug:.*^---/ms;
const input = `---
title: "Modifier: (?ims-ims:...)"
slug: Web/JavaScript/Reference/Regular_expressions/Modifier
---`;
pattern.test(input); // true
// Extra line break at the start of string
const input2 = `\n${input}`;
pattern.test(input2); // falseconst pattern = /(?:var|let|const) (?i:foo|bar)\b/;
pattern.test("let foo;"); // true
pattern.test("const BAR = 1;"); // true
pattern.test("Let foo be a number"); // false