v160 · javascript · regexp

Buffer anchor tester

Type a pattern that uses \A, \z or \Z, pick flags, and feed it input with real line breaks. Every result below comes from new RegExp(pattern, flags) in this browser — including the SyntaxError when the engine does not know the escapes.

Probing this browser…

Try a pattern

Flags

The escapes only exist in Unicode mode (u or v). Untick both to see the Annex B literal behaviour.

Preset inputs
Press “Run pattern”.

Strip: each box is one input character (\n shown as a grey box); dark boxes are matched characters; a blue bar marks a zero-width match position.

The explainer’s truth table, run live

The proposal README lists nine expected results for /\Afoo|^bar$|baz\z/um. This runs the same nine inputs against your current pattern and flags and compares with the README when they match the original.

Expected = README value for /\Afoo|^bar$|baz\z/um
InputExpectedObservedVerdict
Not run yet.

 

what to notice

see also