composer/pcre
Type-safe wrapper around PHP’s preg_* functions. Composer\Pcre\Preg prevents silent PCRE failures, standardizes return types (PREG_UNMATCHED_AS_NULL), and improves static analysis with a PHPStan extension for regex-aware typing.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| apie/regex-tools | 0.84 | Utility package from the Apie ecosystem that provides internal tools for working with regular expressions in PHP, including helpers for building and validating regex patterns. Maintained in the Apie monorepo; primarily intended for internal use. | 0 | 0 | 0 | 24 | 0 | 0.0 | 19.3 | MIT | — | |
| ilario-pierbattista/reverse-regex | 0.82 | Generate example strings from regular expressions in PHP—useful for test data for forms, databases, and regex validation. Includes lexer/parser and random generators, supports literals, groups, classes, ranges, and quantifiers (with some Unicode/PCRE limits). | 2 | 3 | 2 | 1K | 0 | 18.4 | 40.8 | MIT | 2 months ago | |
| s9e/regexp-builder | 0.82 | 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. | 35 | 36 | 3 | 56K | 0 | 5.1 | 44.1 | MIT | 3 years ago | |
| niklongstone/regex-reverse | 0.81 | Generate random strings that match a given PCRE-style regex. Supports common character classes (\d, \w, \s), ranges, groups, alternation, and quantifiers (*, +, ?, {n,m}). Simple API: RegRev::generate($pattern). | 103 | 105 | 8 | 3K | 2 | 3.0 | 21.0 | MIT | 10 years ago | |
| php-standard-library/regex | 0.81 | Type-safe regex for PHP with typed capture groups and predictable error handling. Build expressions with confidence, get structured match results, and avoid silent failures common in preg_* functions. Part of PHP Standard Library. | 0 | 1 | — | 27K | — | 21.2 | 64.8 | — | — | |
| icomefromthenet/reverse-regex | 0.81 | Generate sample strings from regular expressions for test data and validation. ReverseRegex parses a supported subset of regex syntax (literals, groups, character classes, quantifiers, escapes, some Unicode via \X{####}) and outputs randomized matching text via PHP generators. | 136 | 138 | 38 | 3K | 4 | 3.2 | 21.0 | MIT | — | |
| spatie/regex | 0.78 | Cleaner, safer wrapper around PHP’s preg_* functions. Provides Regex::match/matchAll/replace with MatchResult objects, easy access to groups, sensible defaults, and callback-based replacements—no by-reference variables or confusing false/null error handling. | 1,121 | 1,133 | 50 | 874K | 0 | 11.6 | 39.9 | MIT | 4 years ago | |
| alexeyshockov/pattern-matcher | 0.75 | Lightweight PHP pattern-matching utility by Alexey Shockov. Helps compare values against defined patterns and execute matching logic, enabling cleaner conditional flows than nested if/switch statements. Suitable for small libraries and framework-agnostic use. | 1 | 1 | 0 | 0 | 0 | 0.0 | — | — | — | |
| mrpunyapal/rector-pest | 0.73 | Rector rules for migrating PHP tests to Pest. Automates converting PHPUnit-style tests and assertions into Pest’s fluent syntax, helping you modernize test suites quickly and consistently with minimal manual edits. | 64 | 64 | 5 | 20K | 0 | 28.9 | 40.1 | MIT | 3 weeks ago | |
| pestphp/pest-plugin-profanity | 0.70 | Pest Profanity plugin helps enforce clean language in your test suite by detecting and preventing profanity in test names and output. Simple to install and use with Pest to keep your codebase and CI logs professional. | 105 | 105 | 24 | 3M | 0 | 11.7 | 55.9 | MIT | 11 months ago | |
| thecodingmachine/phpstan-safe-rule | 0.70 | PHPStan rule set that flags calls to “unsafe” PHP functions that can return false on failure and suggests using the thecodingmachine/safe equivalents that throw exceptions, helping enforce safer, exception-based error handling in your codebase. | 62 | 62 | 25 | 227K | 3 | 15.8 | 53.4 | — | 6 months ago |
How can I help you explore Laravel packages today?