A 100% ECMA-262 compliant regular expression engine for PHP, designed for JSON Schema validation and full JavaScript regex compatibility.
Find a file
Brian Faust 78bd55fa9c
first commit
Signed-off-by: Brian Faust <brian@cline.sh>
2025-12-26 16:45:40 +02:00
.github first commit 2025-12-26 16:45:40 +02:00
config first commit 2025-12-26 16:45:40 +02:00
docker/php first commit 2025-12-26 16:45:40 +02:00
src first commit 2025-12-26 16:45:40 +02:00
tests first commit 2025-12-26 16:45:40 +02:00
.editorconfig first commit 2025-12-26 16:45:40 +02:00
.gitattributes first commit 2025-12-26 16:45:40 +02:00
.gitignore first commit 2025-12-26 16:45:40 +02:00
CHANGELOG.md first commit 2025-12-26 16:45:40 +02:00
CODE_OF_CONDUCT.md first commit 2025-12-26 16:45:40 +02:00
composer.json first commit 2025-12-26 16:45:40 +02:00
CONTRIBUTING.md first commit 2025-12-26 16:45:40 +02:00
docker-compose.yml first commit 2025-12-26 16:45:40 +02:00
ecs.php first commit 2025-12-26 16:45:40 +02:00
LICENSE.md first commit 2025-12-26 16:45:40 +02:00
Makefile first commit 2025-12-26 16:45:40 +02:00
phpstan.neon.dist first commit 2025-12-26 16:45:40 +02:00
phpunit.xml.dist first commit 2025-12-26 16:45:40 +02:00
README.md first commit 2025-12-26 16:45:40 +02:00
rector.php first commit 2025-12-26 16:45:40 +02:00
SECURITY.md first commit 2025-12-26 16:45:40 +02:00
testbench.yaml first commit 2025-12-26 16:45:40 +02:00

GitHub Workflow Status Latest Version on Packagist Software License Total Downloads


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:

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.