Skip to content

Support regex split #44

Closed as not planned
Closed as not planned

Description

@Mearman

split takes a literal, non-empty separator because decode joins the parts back with that same separator. With a pattern, nothing records which text matched, so the join is not determined.

Decision: decline. Besides the undetermined join, a regular expression in a crosswalk is evaluated by a synchronous executor over document data, and JavaScript's engine backtracks: a crafted pattern can take super-linear work on a short input. Crosswalks are data the codec validates, and the command reads them from URLs (#48), so a pattern field would let a crosswalk author make every encode call arbitrarily expensive. Recording the matched separator per boundary would keep the round trip but not remove that cost.

Revisit if a real source uses a small set of literal separators: a split over a declared list of literal separators that records which one occurred at each boundary is invertible and runs in linear time.

The README reason for this omission is updated in #56.

Activity

  1. added
    enhancementNew feature or request
    deferredDeliberately not built yet, with a trigger for revisiting
    on Oct 20, 2026
  2. added theissue type on Oct 20, 2026
  3. Mearman commented on Oct 21, 2026

    @Mearman
    MemberAuthor

    Declined as recorded: a pattern split has no determined join and would let a crosswalk author make every encode call arbitrarily expensive. The revisit condition (a declared list of literal separators, recorded per boundary) stays in the body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    deferredDeliberately not built yet, with a trigger for revisitingenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions