PHPRegex
Static analysis, linter & logic solver for PHP regular expressions-
Verified
We've verified that the organization php-regex controls the domain:
- php-regex.com
PHPRegex
Static analysis, linter & logic solver for PHP regular expressions
Every package is a read-only split of the PHPRegex — please open issues and pull requests there.
2.0 is coming — try the dev builds and bring your wishes to the discussions.
Start here
regex-toolkit— one entry point to every PHPRegex library: parse, validate, explain, check ReDoS, optimize, generate, transpile and lint.
Libraries
regex-parser— lexer, immutable AST, printers and validators for PCRE-style patterns.regex-linter— lints the regex patterns of a PHP code base; console, JSON, GitHub, Checkstyle and JUnit reports.regex-redos— finds the patterns that backtrack catastrophically (ReDoS), confirmed against the engine.regex-automata— compares pattern languages through automata: equivalence, intersection, subset.regex-optimizer— rewrites patterns into shorter equivalents, checked by language equivalence.regex-explain— explains, highlights and draws regex ASTs: text, HTML, ASCII trees, Mermaid and railroad diagrams.regex-generator— generates sample strings and test cases a pattern matches or rejects.regex-transpiler— transpiles PCRE patterns to JavaScript and Python, with the losses reported.
Tooling
regex-cli— theregexcommand: validate, explain, analyze, lint and compare patterns from the terminal.regex-phpstan— PHPStan extension that reports the regex patterns your target PHP refuses.regex-psalm— Psalm plugin that types the matches ofpreg_match()andpreg_match_all(), and reports invalid patterns.regex-rector— Rector rules that rewritepreg_*calls into the string functions the automata prove they match.regex-phpunit— PHPUnit assertions backed by the parser: exact captures, engine compilation and proven-linear ReDoS verdicts.regex-infection— Infection mutators for regex literals: no mutant the automata prove equivalent, each with the subject that kills it.regex-language-server— a Language Server for the regex patterns of PHP files: diagnostics, hovers and code actions.regex-mcp— an MCP server for coding agents: validation, explanations, layout, translation and ReDoS verdicts, read-only, over stdio.
Integrations
regex-symfony— Symfony bundle: the Regex service and the regex:* commands.regex-laravel— Laravel integration: the Regex facade and the regex:* artisan commands.
Documentation
- Quick start — install and parse your first pattern in two minutes.
- Tutorial — a guided walk through regex syntax, concept by concept.
- PCRE2 conformance — how closely the parser follows the real engine, case by case.
Pinned Loading
-
php-regex php-regex Public
Static analysis, linter & logic solver for PHP regular expressions
Repositories
Showing 10 of 24 repositories-
php-regex
Public
Static analysis, linter & logic solver for PHP regular expressions
Uh oh!
There was an error while loading. Please reload this page.
php-regex/php-regex's past year of commit activity PHP 29 MIT 3 0 6 Updated Dec 3, 2026 -
regex-parser-php74
Public
[READ-ONLY] The PHPRegex parser built to run on hosts PHP 7.4-8.0. Generated split of php-regex/php-regex, tagged per release.
Uh oh!
There was an error while loading. Please reload this page.
php-regex/regex-parser-php74's past year of commit activity PHP 0 MIT 0 0 0 Updated Dec 3, 2026 -
regex-symfony
Public
[READ-ONLY] Symfony bundle for PHPRegex: the Regex service and the regex:lint, regex:routes, regex:security, regex:compare and regex:transpile commands. Split of php-regex/php-regex.
Uh oh!
There was an error while loading. Please reload this page.
php-regex/regex-symfony's past year of commit activity PHP 0 MIT 0 0 0 Updated Dec 3, 2026 -
regex-cli
Public
[READ-ONLY] The regex command: validate, explain, analyze, lint and compare patterns from the terminal. Split of php-regex/php-regex.
Uh oh!
There was an error while loading. Please reload this page.
php-regex/regex-cli's past year of commit activity PHP 0 MIT 0 0 0 Updated Dec 3, 2026 -
regex-linter
Public
[READ-ONLY] Lints the regex patterns of a PHP code base: extraction from PHP sources, lint rules, ReDoS and validity checks, reports in console, JSON, GitHub, Checkstyle and JUnit formats. Split of php-regex/php-regex.
Uh oh!
There was an error while loading. Please reload this page.
php-regex/regex-linter's past year of commit activity PHP 0 MIT 0 0 0 Updated Dec 3, 2026 -
regex-transpiler
Public
[READ-ONLY] Transpiles PCRE patterns to JavaScript and Python regular expressions, with the losses reported. Split of php-regex/php-regex.
Uh oh!
There was an error while loading. Please reload this page.
php-regex/regex-transpiler's past year of commit activity PHP 0 MIT 0 0 0 Updated Dec 3, 2026 -
regex-redos
Public
[READ-ONLY] Finds the patterns that backtrack catastrophically (ReDoS) from the AST, and can confirm a finding against the engine. Split of php-regex/php-regex.
Uh oh!
There was an error while loading. Please reload this page.
php-regex/regex-redos's past year of commit activity PHP 0 MIT 0 0 0 Updated Dec 3, 2026 -
regex-automata
Public
[READ-ONLY] Compiles the regular subset of PCRE to automata to compare languages: equivalence, intersection, subset and example strings. Split of php-regex/php-regex.
Uh oh!
There was an error while loading. Please reload this page.
php-regex/regex-automata's past year of commit activity PHP 0 MIT 0 0 0 Updated Dec 3, 2026 -
regex-explain
Public
[READ-ONLY] Explains, highlights and draws regex ASTs: plain text and HTML explanations, console and HTML highlighting, ASCII trees, Mermaid and railroad diagrams. Split of php-regex/php-regex.
Uh oh!
There was an error while loading. Please reload this page.
php-regex/regex-explain's past year of commit activity PHP 0 MIT 0 0 0 Updated Dec 3, 2026 -
regex-parser
Public
[READ-ONLY] The PCRE2 regex parser: lexer, immutable AST, validator that answers as PHP's PCRE2 would for a chosen release, AST cache and the small AST analyses. Split of php-regex/php-regex.
Uh oh!
There was an error while loading. Please reload this page.
php-regex/regex-parser's past year of commit activity PHP 0 MIT 0 0 0 Updated Dec 3, 2026
People
Top languages
Loading…
Uh oh!
There was an error while loading. Please reload this page.
Most used topics
Loading…
Uh oh!
There was an error while loading. Please reload this page.