Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Regexp Builder Laravel Package

s9e/regexp-builder

Generate compact regular expressions that match a given list of strings (ideal for keyword search). Builds optimized patterns like ba[rz]|foo from input terms, with factories for PHP, Java, JavaScript, RE2, plus RawBytes/RawUTF8 output modes.

View on GitHub
Deep Wiki
Context7
2.0.0

See UPGRADING.md for backward-incompatible changes and CHANGES.md for an overview of functional changes.

2.0.0-beta.3

See CHANGELOG.md for a list of changes.

2.0.0-beta.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)"
1.4.6

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.

1.4.5

All classes have been converted enforce strict typing. There is no other change.

1.4.4

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.

1.4.3

composer.json was updated.

1.4.2

Some internal methods have been updated with no functional change.

1.4.1

This release fixes an issue with unescaped carets at the beginning of a character class.

1.4.0

Added support for custom meta-characters. See README.md for usage.

1.3.0

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.

1.2.0

Added a new pass: CoalesceOptionalStrings. It turns (?:ab?|b)? into a?b?.

1.1.0

Added support for JavaScript regexps with u flag.

1.0.1

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.

1.0.0

Initial release.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
craftcms/url-validator
directorytree/privacy-filter-classifier
directorytree/privacy-filter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity
testo/bridge-symfony