What it does
Flags change how the whole pattern is read: i ignores case, m makes ^ and $ work per line, s lets . match line breaks.
How to use it
- Load the example: cat with flag i.
- Remove the flag and run again.
- See each engine’s accepted flags in the flag list.
Verified example
Example
Text "Cat cAT"
cat Result: "Cat", "cAT"
cat Result: "Cat", "cAT"
cat Result: "Cat", "cAT"
cat Result: "Cat", "cAT"
Counterexample
Text "dog"
cat Result: no match
cat Result: no match
cat Result: no match
cat Result: no match
Recorded by running fixture FX-S07 on : rp.js@1 on Node v24.21.0 (V8), v24.21.0, CPython 3.14.2 (Pyodide 314.0.7), PCRE2 10.48, go1.27.1. JavaScript results come from the rp.js@1 core on Node’s V8; your browser runs the same core.
Engines
- Each engine accepts a different flag set; a flag an engine cannot run is shown as an error, never dropped.
Limits
- Case folding for non-ASCII letters differs between engines.