Download the PHP package neophp/regexbuilder-package without Composer
On this page you can find all versions of the php package neophp/regexbuilder-package. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download neophp/regexbuilder-package
More information about neophp/regexbuilder-package
Files in neophp/regexbuilder-package
Package regexbuilder-package
Short Description For this package there is no description available.
License
Informations about the package 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
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
Register it in the project's Config/app.config.php:
No configuration file, no migration.
Usage
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
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
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
Every visual value is a CSS custom property scoped to .rb-layout:
License
MIT