Skip to content

feat(regexp): re-seq, re-replace/-first, re-split#131

Merged
jig merged 1 commit into
developfrom
feat/regexp-replace-split-seq
Jul 23, 2026
Merged

feat(regexp): re-seq, re-replace/-first, re-split#131
jig merged 1 commit into
developfrom
feat/regexp-replace-split-seq

Conversation

@jig

@jig jig commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Closes the regexp library — the three functions left as "planned":

  • re-seq — vector of every non-overlapping match, each shaped like re-find (the match string, or [whole g1 g2 …] with groups). [] when nothing matches.
  • re-replace / re-replace-first — rewrite matches with $1 / ${name} group references ($$ for a literal $). re-replace-first leaves the string unchanged when there is no match. Function replacements are not supported.
  • re-split — split around matches into a vector, with an optional integer limit. Follows Go's Split: trailing empty pieces are kept.

All accept a compiled regex or a raw ¬…¬ pattern, like the existing builtins.

Docs (README.md, CHANGELOG.md, regenerated LANGUAGE.md) and tests updated; both the untagged and -tags debugger suites pass locally.

🤖 Generated with Claude Code

Complete the regexp library with the remaining Clojure-style builtins:

- re-seq: vector of every non-overlapping match, each shaped like
  re-find (match string, or [whole g1 g2 …] with groups)
- re-replace / re-replace-first: rewrite matches with $1 / ${name}
  group references ($$ for a literal $); replace-first leaves the
  string unchanged when there is no match
- re-split: split around matches into a vector, with an optional
  integer limit (Go Split semantics: trailing empties kept)

Docs (README, CHANGELOG, LANGUAGE.md) and tests updated.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jig
jig merged commit b855aee into develop Jul 23, 2026
14 checks passed
@jig
jig deleted the feat/regexp-replace-split-seq branch July 23, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant