PHPackages                             deplaced/regex-simplified - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. deplaced/regex-simplified

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

deplaced/regex-simplified
=========================

A simple, customizable regex builder for PHP.

v0.1.0(6mo ago)02MITPHPPHP &gt;=8.3.0CI passing

Since Oct 23Pushed 6mo agoCompare

[ Source](https://github.com/DePlaced/regex-simplified)[ Packagist](https://packagist.org/packages/deplaced/regex-simplified)[ Docs](https://github.com/DePlaced/regex-simplified)[ RSS](/packages/deplaced-regex-simplified/feed)WikiDiscussions main Synced 1mo ago

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

[![Packagist Version](https://camo.githubusercontent.com/c7a92a311762f8c8bfb552539db966197458c34952a1d97d37b4ddedcd3470ac/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6465706c616365642f72656765782d73696d706c69666965643f6c6162656c3d76657273696f6e)](https://packagist.org/packages/deplaced/regex-simplified)[![PHP Version](https://camo.githubusercontent.com/2997ac67fa44d8175d83523d88c3a97c5bcf6f4121f2269a69fbcf97f7cfd669/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6465706c616365642f72656765782d73696d706c69666965643f636f6c6f723d626c7565)](https://packagist.org/packages/deplaced/regex-simplified)[![License](https://camo.githubusercontent.com/0f5634f76ad395631ac23df2997b206b902fb58e585d03cac7e096903c09cb57/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f4465506c616365642f72656765782d73696d706c69666965642e7376673f636f6c6f723d6f72616e6765)](LICENSE)[![Tests](https://github.com/DePlaced/regex-simplified/actions/workflows/tests.yml/badge.svg)](https://github.com/DePlaced/regex-simplified/actions)

Regex Simplified
================

[](#regex-simplified)

Simple, customizable regex builder focused on letters and numbers.

Install
-------

[](#install)

```
composer require DePlaced/regex-simplified
```

---

Usage
-----

[](#usage)

```
use DePlaced\RegexSimplified\Regex;

// Example: match uppercase-only strings
$rx = Regex::make()
    ->start()
    ->uppercase()
    ->oneOrMore()
    ->end();

var_dump($rx->test('HELLO')); // true
var_dump($rx->test('Hello')); // false
```

---

Examples
--------

[](#examples)

PatternChainMatchesNon-matches`/^[a-z]+$/u``Regex::make()->start()->lowercase()->oneOrMore()->end()``abc`, `hello``Hello`, `123``/^[A-Z]+$/u``Regex::make()->start()->uppercase()->oneOrMore()->end()``ABC`, `HELLO``Hello`, `abc``/^[A-Za-z]{3,5}$/u``Regex::make()->start()->letter()->repeat(3,5)->end()``abc`, `Hello``he`, `toolong`---

⚙️ API Reference
----------------

[](#️-api-reference)

MethodDescription`Regex::make()`Create a new instance.`lowercase()`Match lowercase letters `[a-z]`.`uppercase()`Match uppercase letters `[A-Z]`.`letter()`Match any letter `[A-Za-z]`.`number()`Match digits `[0-9]`.`oneOrMore()`Quantifier `+`.`repeat($min, $max = null)`Quantifier `{min,max}`.`start()`Anchor to start `^`.`end()`Anchor to end `$`.`toPreg()`Get the final regex string.`test($string)`Test a string against the built regex.---

🧩 Development
-------------

[](#-development)

Clone your fork and install dependencies:

```
composer install
```

Run tests:

```
vendor/bin/phpunit
```

---

🏷️ Versioning
-------------

[](#️-versioning)

This project follows **[Semantic Versioning](https://semver.org/)**.

- Before `1.0.0`, breaking changes may occur in **minor** versions (`0.x.0`).
- After `1.0.0`, breaking changes only happen in **major** versions.

See [CHANGELOG.md](CHANGELOG.md) for release notes.

---

🤝 Contributing
--------------

[](#-contributing)

Pull requests and issues are welcome!
Please use [Conventional Commits](https://www.conventionalcommits.org/) if possible:

- `feat:` new feature
- `fix:` bug fix
- `docs:` documentation
- `test:` tests
- `chore:` maintenance

---

📄 License
---------

[](#-license)

This project is open source under the [MIT License](LICENSE).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance66

Regular maintenance activity

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 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

202d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0ceca823d3f58202bbe757a60ac8bf615e2749374bdeac2a5cf71d71e178c1fd?d=identicon)[deplace](/maintainers/deplace)

---

Top Contributors

[![DePlaced](https://avatars.githubusercontent.com/u/117630280?v=4)](https://github.com/DePlaced "DePlaced (32 commits)")

---

Tags

validationregex

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/deplaced-regex-simplified/health.svg)

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

###  Alternatives

[composer/semver

Version comparison library that offers utilities, version constraint parsing and validation.

3.3k489.6M672](/packages/composer-semver)[giggsey/libphonenumber-for-php

A library for parsing, formatting, storing and validating international phone numbers, a PHP Port of Google's libphonenumber.

5.0k148.7M416](/packages/giggsey-libphonenumber-for-php)[respect/validation

The most awesome validation engine ever created for PHP

5.9k37.4M383](/packages/respect-validation)[propaganistas/laravel-phone

Adds phone number functionality to Laravel based on Google's libphonenumber API.

3.0k35.7M107](/packages/propaganistas-laravel-phone)[opis/json-schema

Json Schema Validator for PHP

64236.9M186](/packages/opis-json-schema)[giggsey/libphonenumber-for-php-lite

A lite version of giggsey/libphonenumber-for-php, which is a PHP Port of Google's libphonenumber

8412.9M47](/packages/giggsey-libphonenumber-for-php-lite)

PHPackages © 2026

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