spatie/regex
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.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| composer/pcre | 0.87 | 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. | 693 | 694 | 15 | 10M | 0 | 31.4 | 65.0 | MIT | 1 year ago | |
| ilario-pierbattista/reverse-regex | 0.86 | 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 | 21.6 | 41.7 | MIT | 1 week ago | |
| php-standard-library/regex | 0.85 | 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 | 0 | 0 | 6K | 0 | 20.6 | 56.6 | MIT | 2 weeks ago | |
| spatie/elasticsearch-search-string-parser | 0.77 | Parse custom search strings into Elasticsearch queries. Supports regex-based directives like status:active or @user, grouping directives, and autocomplete suggestions. Build searches via spatie/elasticsearch-query-builder and get results + directive suggestions. | 49 | 49 | 4 | 86 | 0 | 22.8 | 7.1 | MIT | 9 months ago |
How can I help you explore Laravel packages today?