PHPackages                             kyoushu/regex-builder - 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. kyoushu/regex-builder

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

kyoushu/regex-builder
=====================

A library for building simple regex strings procedurally

1.0.0(11y ago)119MITPHP

Since Feb 17Pushed 11y ago1 watchersCompare

[ Source](https://github.com/Kyoushu/RegexBuilder)[ Packagist](https://packagist.org/packages/kyoushu/regex-builder)[ RSS](/packages/kyoushu-regex-builder/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Kyoushu\\RegexBuilder
=====================

[](#kyoushuregexbuilder)

[![Build Status](https://camo.githubusercontent.com/ca885dd455125be3e352830364fb6bb4be2bf4781679bc6138c7210dd3dca10e/68747470733a2f2f7472617669732d63692e6f72672f4b796f757368752f52656765784275696c6465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Kyoushu/RegexBuilder)

A library for building simple regex strings procedurally

Example
-------

[](#example)

```
$regex = RegexBuilder::create()
    ->start()
    ->letter()->repeated()->captureAs('office')
    ->string('_')
    ->number()->repeated(3)->captureAs('id')
    ->end()
    ->getRegex();

preg_match($regex, 'OfficeName_123', $match); // Returns TRUE

$regex = RegexBuilder::create()
    ->start()
    ->letter()->repeated()->captureAs('firstWord')
    ->string('_')
    ->matchCaptured('firstWord')
    ->string('_')
    ->number()->repeated()
    ->end()
    ->getRegex();

preg_match($regex, 'bar_bar_0293', $match); // Returns TRUE

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Unknown

Total

1

Last Release

4101d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9a3b4f2acc5f46d8ce4639b0f5a3548d75a6de9f12643869c284175a64cc0cc2?d=identicon)[Kyoushu](/maintainers/Kyoushu)

---

Top Contributors

[![Kyoushu](https://avatars.githubusercontent.com/u/535916?v=4)](https://github.com/Kyoushu "Kyoushu (12 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kyoushu-regex-builder/health.svg)

```
[![Health](https://phpackages.com/badges/kyoushu-regex-builder/health.svg)](https://phpackages.com/packages/kyoushu-regex-builder)
```

###  Alternatives

[leocarmo/graceful-shutdown-php

Graceful Shutdown for PHP

18108.2k](/packages/leocarmo-graceful-shutdown-php)[bogdaan/open-location-code

Open location code for php

1076.5k](/packages/bogdaan-open-location-code)

PHPackages © 2026

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