NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #2823 most downloaded on npm
Recursive matching plugin for Regex+
Last release 2 years ago
no release in 18 months
Release timing varies
gaps range from 8 days to 3 months
Nearly every release is documented
notes for 13 of 14 stable releases
Nothing withdrawn
no release was ever pulled
2 years old
14 releases · first in 2024
Fixed a capture transfer edge case.
Updated capture transfer to record all expanded captures that can transfer, not just the last.
Switched to the Regex+ 6.0.0 plugin API.
One column per month.
'plugin' (default) and 'external' that can be provided if calling recursion directly.Edge case fix for capturing groups with transfer markers.
Support recursion of Regex+ emulation groups (with hidden and transfer markers) and subpatterns that contain them.
Don't include duplicated captures in result arrays when using the subclass option.
subclass option.Allow numbered backreferences if recursed subpatterns don't contain captures.
Fix for recursion by number.
Added support for multiple, non-overlapping recursions in the same pattern.
Added support for subpattern recursion by group number.
d.ts type file.Removed the rregex template tag previously provided as sugar. Instead of e.g. ` rregex… , import the base regex library separately and use regex({plug
Breaking changes
rregex template tag previously provided as sugar. Instead of e.g. rregex`…`, import the base regex library separately and use regex({plugins: [recursion]})`…`.regex-recursion.min.js browser bundle from Regex.ext to Regex.plugins.Improvements
regex v4.0.0 plugin API.Fixes
If desired, you can recreate the rregex tag from previous versions:
import {regex} from 'regex';
import {recursion} from 'regex-recursion';
function rregex(first, ...values) {
const plugins = (first?.plugins || []).concat(recursion);
// Given a template
if (Array.isArray(first?.raw)) {
return regex({plugins})(first, ...values);
// Given flags
} else if ((typeof first === 'string' || first === undefined) && !values.length) {
return regex({flags: first, plugins});
// Given an options object
} else if ({}.toString.call(first) === '[object Object]' && !values.length) {
return regex({...first, plugins});
}
throw new Error(`Unexpected arguments: ${JSON.stringify([first, ...values])}`);
}
Updated the base regex package to v3.1.0.
regex package to v3.1.0.Changed the capture/backreference depth suffix from $rN to _$N.
$rN to _$N.RegExp instances, by throwing a descriptive error.n is disabled.Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →