NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #2361 most downloaded on Packagist
Library that generates regular expressions that match a list of strings.
Latest stable
2.1.0
Last release 4 years ago
no release in 18 months
Release timing varies
gaps range from 2 weeks to 1.3 years
Most releases are documented
notes for 12 of 14 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
18 releases · first in 2016
Drag across the ruler to compare, or tap a release to open it.
Add meta as a promoted constructor parameter
Full Changelog: https://github.com/s9e/RegexpBuilder/compare/2.0.0...2.1.0
See UPGRADING.md for backward-incompatible changes and CHANGES.md for an overview of functional changes.
See UPGRADING.md for backward-incompatible changes and CHANGES.md for an overview of functional changes.
The final expression does not use a non-capturing group for its first set of alternations. The s9e\RegexpBuilder\Builder::$standalone property can be used to control this behaviour.
aa|bb(?:cc|dd)The Java output uses \uHHHH instead of \u{HHHH}.
Expressions created from meta-characters are moved to the end of a group.
(?:.*|x)(?:x|.*)Strings are sorted after surrogate pairs are created.
\uD83C\uDD90(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?\uD83C\uDD90(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?Your coding agent can read these notes before it upgrades. Set up the MCP server →
Nothing published for this version
See CHANGELOG.md for a list of changes.
See CHANGELOG.md for a list of changes.
Nothing published for this version
PHP requirements have been bumped to 8.1.
PHP requirements have been bumped to 8.1.
⚠ Change in behaviour: alternations at the root level of the generated expression are not put in a non-capturing group anymore. This change is only relevant if the generated expression is used as part of a bigger regexp. The old behaviour can be restored at runtime via the $builder->standalone property. See below for an example.
$builder = new s9e\RegexpBuilder\Builder;
var_dump($builder->build(['foo', 'bar', 'baz']));
$builder->standalone = false;
var_dump($builder->build(['foo', 'bar', 'baz']));
string(10) "ba[rz]|foo"
string(14) "(?:ba[rz]|foo)"
This release fixes an issue (PHP error) that can occur with some combinations of strings. It requires a fairly specific combination of strings made of
This release fixes an issue (PHP error) that can occur with some combinations of strings. It requires a fairly specific combination of strings made of digits and sharing the same prefix.
All classes have been converted enforce strict typing. There is no other change.
All classes have been converted enforce strict typing. There is no other change.
This release fixes a typo that caused left square brackets to be incorrectly interpreted as right square brackets, as well as a typing error on PHP 7.
This release fixes a typo that caused left square brackets to be incorrectly interpreted as right square brackets, as well as a typing error on PHP 7.4.
Nothing published for this version
Some internal methods have been updated with no functional change.
Some internal methods have been updated with no functional change.
This release fixes an issue with unescaped carets at the beginning of a character class.
This release fixes an issue with unescaped carets at the beginning of a character class.
Added support for custom meta-characters. See README.md for usage.
Added support for custom meta-characters. See README.md for usage.
Removed the Utf8ToSurrogates input and added a useSurrogates option to the Utf8 input class. Added a case option to the PHP and JavaScript output clas
Removed the Utf8ToSurrogates input and added a useSurrogates option to the Utf8 input class.
Added a case option to the PHP and JavaScript output classes.
See the README.md file for updated usage.
Added a new pass: CoalesceOptionalStrings. It turns (?:ab?|b)? into a?b?.
Added a new pass: CoalesceOptionalStrings. It turns (?:ab?|b)? into a?b?.
Added support for JavaScript regexps with u flag.
Added support for JavaScript regexps with u flag.
No functional changes from 1.0.0. Surrogates are ordered differently in JavaScript but it should have no functional effect. Some code has been simplif
No functional changes from 1.0.0. Surrogates are ordered differently in JavaScript but it should have no functional effect. Some code has been simplified or refactored.
Nothing published for this version
One column per quarter.