v160 · javascript · regexp

Assertion position map

An inspection tool for zero-width anchors. For the text below, each row runs one assertion as a global Unicode-mode regex with matchAll and lists every index where it succeeded. Toggle m and watch ^/$ multiply while \A, \z and \Z stay put. The right-hand columns re-run the proposal’s desugared RegExp-modifier forms and check they agree.

Probing this browser…

Map the positions

Use the presets to insert \r\n, lone \r or U+2028, which are hard to type. (A textarea turns typed or pasted \r into \n, so preset text is kept exactly until you edit it; the summary shows the exact string.)

Preset texts
Flags
Zero-width match indices, flags gu + optional m
AssertionIndicesDesugared formDesugared indicesAgree?
Not run yet.
 

Positions drawn on the text

reading the map

see also