sters/regexp-trie

0.0.4 2017-08-17 00:39 UTC

README

CircleCI Packagist

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])/"