|
1 | 1 | <p align="center"> |
2 | | - <img src="art/banner.svg" alt="Regex Parser Logo" width="100%"> |
| 2 | + <img src="art/banner.svg" alt="RegexParser" width="100%"> |
3 | 3 | </p> |
4 | 4 |
|
5 | 5 | <p align="center"> |
6 | | - <em>Design. Parse. Trust every regex.</em> |
| 6 | + <strong>Treat Regular Expressions as Code.</strong> |
7 | 7 | </p> |
8 | 8 |
|
9 | 9 | <p align="center"> |
|
17 | 17 | <a href="https://packagist.org/packages/yoeunes/regex-parser"><img src="https://img.shields.io/packagist/php-v/yoeunes/regex-parser.svg" alt="Supported PHP Version Badge"></a> |
18 | 18 | </p> |
19 | 19 |
|
20 | | -**A full PCRE regex parser, analyzer & optimizer for PHP.** |
| 20 | +--- |
| 21 | + |
| 22 | +**RegexParser transforms opaque PCRE strings into a structured Abstract Syntax Tree.** |
| 23 | + |
| 24 | +It brings static analysis, security auditing, and automated refactoring to PHP's most powerful yet misunderstood tool. Stop treating regexes as magic strings; start treating them as logic. |
| 25 | + |
| 26 | +### Core Capabilities |
21 | 27 |
|
22 | | -- ✅ Parses **PCRE** patterns (subroutines, conditionals, recursion, verbs…) |
23 | | -- ✅ Builds a rich **AST** that you can analyze and transform |
24 | | -- ✅ Detects **ReDoS** (Regular Expression Denial of Service) risks |
25 | | -- ✅ Generates **human explanations**, **HTML docs**, and **sample strings** |
26 | | -- ✅ Integrates with **Symfony**, **PHPStan**, and **Rector** |
| 28 | +* **Deep Parsing** — Full support for advanced PCRE2 syntax including subroutines, conditionals, and recursion. |
| 29 | +* **Security Auditing** — Detects Catastrophic Backtracking (ReDoS) risks and vulnerabilities at analysis time. |
| 30 | +* **Documentation** — Automatically generates human-readable explanations, HTML visualizations, and valid sample strings. |
| 31 | +* **Transformation** — Manipulate the AST to optimize or refactor patterns programmatically. |
| 32 | +* **Integration** — First-class support for Symfony, PHPStan, and Rector workflows. |
27 | 33 |
|
28 | | -> Think of it as `nikic/php-parser` — but for regexes. |
| 34 | +> *"Think of it as `nikic/php-parser` — but for regexes."* |
29 | 35 |
|
30 | 36 | --- |
31 | 37 |
|
|
0 commit comments