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
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| spatie/regex | 0.84 | 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,120 | 1,132 | 50 | 927K | 0 | 11.6 | 40.3 | MIT | 4 years ago | |
| 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 | 0 | 0 | 0.0 | — | MIT | — | |
| php-standard-library/regex | 0.83 | 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. | 1 | 1 | 0 | 26K | 0 | 19.1 | 63.9 | MIT | 1 month ago | |
| 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 | 4K | 0 | 16.1 | 48.3 | MIT | 3 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. | 34 | 36 | 3 | 76K | 0 | 5.1 | 46.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.2 | MIT | 11 years ago | |
| 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 | 2K | 4 | 3.2 | 17.7 | MIT | — | |
| 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 | — | — | — | |
| stripe/stripe-php | 0.67 | Official Stripe PHP SDK for accessing the Stripe API. Install via Composer, configure your API key, and use resource classes that map to Stripe objects and endpoints. Supports PHP 7.2+ (older versions being phased out). | 4,018 | 4,099 | 895 | 5M | 12 | 73.6 | 54.4 | MIT | 5 days ago | |
| phpstan/phpstan | 0.67 | PHPStan is a static analysis tool for PHP that finds bugs without running your code. It catches whole classes of errors early, improving type safety and code correctness, and helps you spot issues before writing tests or deploying. | 14,036 | 14,104 | 954 | 9M | 1,060 | 94.2 | 72.3 | MIT | 2 weeks ago | |
| pact-foundation/pact-php | 0.66 | PHP implementation of the Pact consumer-driven contract testing framework. Define contracts between services, run provider verification, and integrate with PHPUnit/CI to prevent breaking API changes. Supports HTTP interactions, mock servers, and Pact Broker workflows. | 300 | 300 | 89 | 82K | 1 | 30.4 | 42.0 | Apache-2.0 | 2 months ago |
How can I help you explore Laravel packages today?