← Chrome 160 reference · All APIs

v160 · javascript · covered on mdn

Regular Expression Buffer Boundaries

Chrome 160 enables the TC39 Stage 3 RegExp buffer boundary assertions \A, \z, and \Z in Unicode-mode (u or v flag) regular expressions. They match the start of the entire input, the exact end of the input, and the end of the input before an optional trailing line terminator sequence, regardless of whether the m (multiline) flag is set.

Limited availability — not Baseline

  • Chrome · 160 (desktop, Android, WebView)
  • Edge · Chromium-based (mirrors Chrome)
  • Firefox · Nightly 155.0a1 / behind preference in BCD
  • Safari · Preview in BCD (no stable release yet)

No web-features identifier is published yet for RegExp buffer boundaries (ChromeStatus records web_feature: "Missing feature"). BCD javascript.regular_expressions.buffer_boundary_assertion currently lists Chrome as false (not yet updated for Chrome 160), Firefox as preview behind javascript.options.experimental.regexp_buffer_boundaries, and Safari as preview (checked 2026-11-24).

this feature is documented on MDN

MDN: Buffer boundary assertion: \A, \z, \Z

MDN’s dedicated page (verified HTTP 200 on 2026-11-24) covers formal syntax, semantics for \A, \z, and \Z, worked examples (mixing \A with multiline ^ and matching end-of-file with optional trailing newline via \Z), Specifications, and BCD-backed Browser compatibility. gendn links there rather than duplicating canonical MDN reference prose.

Why gendn doesn’t duplicate MDN: this site fills gaps for Chrome features lacking an MDN article. When MDN already publishes a complete reference, gendn points to MDN and records the Chrome 160 shipping metadata, V8 flag, Annex B compatibility caveat, and interactive showcase demo that MDN does not track.

Chrome 160 details & Unicode-mode requirement

In Unicode-aware mode (u or v flag), the TC39 proposal specification defines three zero-width Assertion escapes equivalent to RegExp modifier expressions:

Annex B trap outside u/v mode: Without the u or v flag, ECMA-262 Annex B parses \A, \z, and \Z as legacy identity escapes matching the literal characters "A", "z", and "Z" without throwing a SyntaxError. None of the three escapes are valid inside a character class ([\A] throws a SyntaxError under u/v).

// Feature detection: Unicode-mode compilation throws SyntaxError on unsupported engines.
function supportsRegExpBufferBoundaries() {
  try {
    return new RegExp("\\Aok\\Z", "u").test("ok\r\n");
  } catch {
    return false;
  }
}

// Mix buffer-start (\A) with line-start (^) under /mu:
const re = /\A#!.*|^\s*\/\/.*/gmu;
re.exec("#!/usr/bin/env node\n  // comment"); // matches hashbang at start of buffer, then line comments

// Caution: omitting `u` or `v` silently falls back to Annex B identity escapes!
/\A/.test("A"); // true (matches literal "A", NOT start of input)
Source: TC39 Regular Expression Buffer Boundaries Stage 3 Draft; proposal README; ChromeStatus 5187917373898752.

live example

Live example from the Chrome Platform Showcase (route HEAD-checked 200, 2026-11-24): tests \A, \z, and \Z across multiline inputs. Sibling concept demos (all HEAD 200): assertion position map, Annex B literal trap, multiline validation bypass, and portable pattern import.Source: chrome-platform-showcase

Browser compatibility

Support for \A, \z, and \Z buffer boundary assertions in Unicode-mode RegExp. Combines BCD javascript/regular_expressions.json with ChromeStatus 5187917373898752 (checked 2026-11-24).
Browser / RuntimeStatusNotes & BCD status
Chrome (desktop, Android, WebView)160Enabled by default in Chrome 160 per milestone=160 listing and ChromeStatus API record; BCD still reads false (not yet updated)
Edge160 (mirror)Chromium-based; BCD mirrors Chrome
FirefoxPreview (155.0a1)ChromeStatus links Firefox 155.0a1 Nightly release notes; BCD lists preview behind preference javascript.options.experimental.regexp_buffer_boundaries
SafariPreviewBCD lists preview; ChromeStatus records Safari signal as “No signal” and no stable release number is confirmed yet
Node.js / Deno / BunUnsupported (BCD)BCD lists false across Node.js, Deno, and Bun as of 2026-11-24 (Node.js inherits support once updated to a V8 release containing Chrome 160’s V8)
Source: BCD javascript/regular_expressions.json; ChromeStatus API record (5187917373898752).

quick reference

Shipped inChrome 160 (desktop, Android, Android WebView; iOS null) — filed under “Enabled by default” in the milestone=160 listing
V8 / Finch flagV8 feature flag js_regexp_buffer_boundaries in V8 src/flags/feature-flags.h; ChromeStatus records Finch name V8Flag_js_regexp_buffer_boundaries (no origin trial, no chrome://flags entry)
SpecificationRegular Expression Buffer Boundaries for ECMAScript (TC39 Stage 3 Draft) · Proposal repository & explainer · tc39/ecma262#3905
Intentblink-dev Intent to Ship
Tracking bugissues.chromium.org/517575874
Conformance teststc39/test262#4975 (Test262 acceptance tests)
ChromeStatus5187917373898752 — Regular Expression Buffer Boundaries (component Blink>JavaScript>Regexp)
Source: ChromeStatus 5187917373898752; MDN Buffer boundary assertion; V8 feature-flags.h.

references