PHPackages                             sters/regexp-trie - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. sters/regexp-trie

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sters/regexp-trie
=================

Regexp::Trie in PHP

0.0.4(8y ago)4119MIT

Since Jan 11Compare

[ Source](https://github.com/sters/php-regexp-trie)[ Packagist](https://packagist.org/packages/sters/regexp-trie)[ Docs](https://github.com/sters/php-regexp-trie)[ RSS](/packages/sters-regexp-trie/feed)WikiDiscussions Synced today

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

Regexp::Trie in PHP
===================

[](#regexptrie-in-php)

[![CircleCI](https://camo.githubusercontent.com/a0519025cf6618553d17a52fb9ad671fbbc6ffea14410101d009d8fb885479fa/68747470733a2f2f636972636c6563692e636f6d2f67682f73746572732f7068702d7265676578702d747269652e7376673f7374796c653d737667)](https://circleci.com/gh/sters/php-regexp-trie)[![Packagist](https://camo.githubusercontent.com/6a2edf48fe54c1704b8a4a1b4400b7b8def8b617ce7a51735bdffb2cfa2e5bfd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73746572732f7265676578702d747269652e737667)](https://packagist.org/packages/sters/regexp-trie)

See also the original [Regexp::Trie in Perl](https://metacpan.org/pod/Regexp::Trie).

Transform from [https://github.com/gfx/ruby-regexp\_trie](https://github.com/gfx/ruby-regexp_trie).

Installation
------------

[](#installation)

Install Plugin using composer.

```
$ composer require "sters/regexp-trie:dev-master"

```

Usage
-----

[](#usage)

```
use RegexpTrie\RegexpTrie;

$regexpTrie = RegexpTrie::union([
    'foo',
    'bar',
    'baz',
]);

var_dump($regexpTrie->toRegexp()); // string(16) "/(?:foo|ba[rz])/"

```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~72 days

Total

4

Last Release

3240d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1658147?v=4)[sters](/maintainers/sters)[@sters](https://github.com/sters)

---

Tags

regexptrie

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sters-regexp-trie/health.svg)

```
[![Health](https://phpackages.com/badges/sters-regexp-trie/health.svg)](https://phpackages.com/packages/sters-regexp-trie)
```

###  Alternatives

[s9e/regexp-builder

Library that generates regular expressions that match a list of strings.

352.3M4](/packages/s9e-regexp-builder)[abelzhou/php-trie-tree

Make a trie tree with php language.

21818.2k1](/packages/abelzhou-php-trie-tree)[regex-guard/regex-guard

A wrapper that allows you to validate regular expressions and handle normally uncatchable PCRE compilation warnings

21522.9k8](/packages/regex-guard-regex-guard)[kozz/emoji-regex

Emoji regex parser

31174.0k](/packages/kozz-emoji-regex)[bassim/super-expressive-php

A PHP port of https://github.com/francisrstokes/super-expressive

2611.3k](/packages/bassim-super-expressive-php)[markbaker/tries

PHP Classes for Trie datastructures

213.8k](/packages/markbaker-tries)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
