PHPackages                             neophp/regexbuilder-package - 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. neophp/regexbuilder-package

ActiveLibrary

neophp/regexbuilder-package
===========================

Dev-only regex tester with live match highlighting for NeoPHP

v0.2.0(yesterday)01↑2900%MITJavaScriptPHP &gt;=8.5CI passing

Since Aug 8Pushed yesterdayCompare

[ Source](https://github.com/NeoPHP-Dev/neo-regexbuilder-package)[ Packagist](https://packagist.org/packages/neophp/regexbuilder-package)[ RSS](/packages/neophp-regexbuilder-package/feed)WikiDiscussions main Synced today

READMEChangelog (2)DependenciesVersions (3)Used By (0)

RegexBuilder Package
====================

[](#regexbuilder-package)

A dev-only regex tester for NeoPHP. Write a pattern, test it against sample text, and see matches highlighted live — entirely client-side, no server round-trip needed to evaluate a match.

---

Structure
---------

[](#structure)

```
regexbuilder-package/
├── composer.json
├── README.md
└── src/
    ├── NeoRegexBuilderPackage.php
    ├── Middleware/
    │   └── DevOnlyMiddleware.php
    ├── Controllers/
    │   └── RegexBuilderController.php
    ├── Assets/
    │   ├── css/regexbuilder.css
    │   └── js/regexbuilder.js
    └── Templates/
        ├── components/
        │   └── RegexBuilder.macro.html.twig
        └── pages/
            └── builder.html.twig

```

---

Dev-only, by design
-------------------

[](#dev-only-by-design)

The standalone page's route is protected by `DevOnlyMiddleware`, which checks `Config/app.config.php`'s `environment` key. Outside `environment: dev`, it returns a blocked response.

The `RegexBuilder` macro itself has no such restriction, since it makes no server calls — if you embed it in your own page (e.g. inside `neo-admin-package`), guard that page the same way you'd guard any other dev tool page in your project.

---

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

[](#installation)

```
php bin/neo package:require neophp/regexbuilder-package --project=MyProject
```

Register it in the project's `Config/app.config.php`:

```
return [
    // ...
    'packages' => [
        \Vendor\NeoPHP\RegexBuilderPackage\NeoRegexBuilderPackage::class,
    ],
];
```

No configuration file, no migration.

---

Usage
-----

[](#usage)

### Standalone page

[](#standalone-page)

Visit `/_regexbuilder/` (only reachable in `dev`). Type a pattern and flags, edit the test string, and matches highlight live below.

### Embedding in your own page

[](#embedding-in-your-own-page)

```
{% import '@RegexBuilder/components/RegexBuilder.macro.html.twig' as RegexBuilder %}

{{ RegexBuilder.render() }}

```

`RegexBuilder.render(instanceId = 'rb')` accepts an optional `instanceId` to avoid collisions if rendered more than once on the same page.

---

PHP vs JavaScript regex differences
-----------------------------------

[](#php-vs-javascript-regex-differences)

This package uses JavaScript's native `RegExp`, not PHP's PCRE (`preg_match`). The two dialects are very similar for everyday patterns, but not identical — some PCRE-specific syntax (certain lookbehind variations, possessive quantifiers, recursive patterns) is not supported by JavaScript's engine. A pattern that behaves correctly here should work in PHP for the vast majority of common cases, but always verify directly in your PHP code for anything advanced.

---

Theming
-------

[](#theming)

Every visual value is a CSS custom property scoped to `.rb-layout`:

```
.rb-layout {
    --rb-accent: #6366f1;
    --rb-bg: #161923;
    --rb-bg-alt: #1b2030;
    --rb-border: #2d3342;
    --rb-text: #e5e7eb;
    --rb-text-muted: #9ca3af;
    --rb-mark-bg: #fbbf24;
}
```

---

License
-------

[](#license)

MIT

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance100

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% 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

Every ~0 days

Total

2

Last Release

1d ago

### Community

Maintainers

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

---

Top Contributors

[![BenjiLeLoustik](https://avatars.githubusercontent.com/u/212323688?v=4)](https://github.com/BenjiLeLoustik "BenjiLeLoustik (10 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

### Embed Badge

![Health badge](/badges/neophp-regexbuilder-package/health.svg)

```
[![Health](https://phpackages.com/badges/neophp-regexbuilder-package/health.svg)](https://phpackages.com/packages/neophp-regexbuilder-package)
```

PHPackages © 2026

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