Skip to content

RegExp lookbehind: captures, back-references, and nested lookaround #612

@frostney

Description

@frostney

Summary

Fix lookbehind for captures inside lookbehind, back-references to lookbehind captures, nested lookaround, and sticky mode.

Why

11 test262 lookBehind tests fail: captures, back-references-to-captures, greedy-loop, nested-lookaround, etc.

Current behavior

Captures inside lookbehind are not propagated to the outer match result.

Expected behavior

Per ES2026 §22.2.2.10, captures inside lookbehind participate in the match result.

Scope notes

  • Source: Goccia.RegExp.VM.pas RX_LOOKBEHIND handler
  • Capture slots from sub-VM need correct merge into outer slots

Metadata

Metadata

Assignees

No one assigned

    Labels

    engineTGocciaEngine: language semantics, ECMAScript built-ins, parser, interpreter, bytecode VMspec complianceMismatch against official JavaScript/TypeScript specification

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions