cline / ecma-regex
100% ECMA-262 compliant regular expression engine for PHP, designed for JSON Schema validation and full JavaScript regex compatibility
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/cline/ecma-regex
Requires
- php: ^8.5.0
Requires (Dev)
- cline/coding-standard: ^1.5.6
- orchestra/testbench: ^10.8
- symfony/var-dumper: ^7.4.0
README
ecma-regex
A 100% ECMA-262 compliant regular expression engine for PHP, designed for JSON Schema validation and full JavaScript regex compatibility.
Why This Package?
PHP uses PCRE (Perl Compatible Regular Expressions), while JSON Schema and JavaScript use ECMA-262 regex syntax. These engines have subtle differences that can cause validation inconsistencies. This package provides a pure PHP implementation of ECMA-262 regex, ensuring perfect compatibility with JSON Schema patterns.
Requirements
Requires PHP 8.5+
Installation
composer require cline/ecma-regex
Usage
See the Getting Started guide for usage examples and the API Reference for complete API documentation.
Documentation
Comprehensive documentation available at docs.cline.sh:
- Getting Started - Installation and basic usage
- Pattern Syntax - Complete pattern reference
- API Reference - Full API documentation
- JSON Schema Integration - JSON Schema validation patterns
- Performance - Caching and optimization
- Architecture - Internal design and structure
- Troubleshooting - Common issues and solutions
External References:
Change log
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please use the GitHub security reporting form rather than the issue queue.
Credits
License
The MIT License. Please see License File for more information.