Reference Index
This section contains the reference material for PHPRegex. Use it when you need specific details, error codes, or API behavior.
Core Reference
- Lint Rule Reference
- SonarPHP Regex Rules
- API Reference
- Diagnostics
- Diagnostics Cheat Sheet
- JSON Output
- Feature Support Matrix
- Correctness Contracts
- Backward Compatibility Promise
- Capture Shapes
- Pattern Info and Compatibility
- Prefilters
- PCRE2 Conformance
- Logic Solver
- FAQ and Glossary
AST and Visitors
External Resources
Quick Access by Task
- Understand a lint warning: the lint rule reference
- Fix a validation error: the diagnostics cheat sheet
- Use the library in code: the API reference
- Read the JSON of the
regexcommand: the JSON output reference - Know what
preg_match()writes into$matches: capture shapes - Read a pattern’s capture count, names, lengths and limits, or the PHP and PCRE2 versions it is valid on: pattern info and compatibility
- Build a custom visitor: AST nodes and AST visitors
- Learn regex patterns: the tutorial
- Check ReDoS safety: the ReDoS guide
- Compare two patterns (equivalence, intersection, subset) or get an example string: the logic solver reference