sters / regexp-trie
Regexp::Trie in PHP
Fund package maintenance!
sters
0.0.4
2017-08-17 00:39 UTC
Requires (Dev)
- phpunit/phpunit: 5.*
This package is auto-updated.
Last update: 2024-10-25 15:10:46 UTC
README
See also the original Regexp::Trie in Perl.
Transform from https://github.com/gfx/ruby-regexp_trie.
Installation
Install Plugin using composer.
$ composer require "sters/regexp-trie:dev-master"
Usage
use RegexpTrie\RegexpTrie;
$regexpTrie = RegexpTrie::union([
'foo',
'bar',
'baz',
]);
var_dump($regexpTrie->toRegexp()); // string(16) "/(?:foo|ba[rz])/"