PHPackages                             cawa0505/verbal-expressions-php - 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. cawa0505/verbal-expressions-php

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

cawa0505/verbal-expressions-php
===============================

PHP Regular expressions made easy.

v1.0.0(7y ago)0951MITPHPPHP &gt;=5.5.9

Since Apr 6Pushed 7y ago1 watchersCompare

[ Source](https://github.com/cawa0505/verbal-expressions-php)[ Packagist](https://packagist.org/packages/cawa0505/verbal-expressions-php)[ RSS](/packages/cawa0505-verbal-expressions-php/feed)WikiDiscussions master Synced 3w ago

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

Verbal Expressions-PHP
======================

[](#verbal-expressions-php)

- Forked from the original [PHP Verbal Expressions](https://github.com/VerbalExpressions/PHPVerbalExpressions) library.
- Ported from [VerbalExpressions](https://github.com/VerbalExpressions/JSVerbalExpressions).

Verbal Expressions is a PHP library that helps to construct hard regular expressions.

Examples
--------

[](#examples)

```
$regex = new VerbalExpressions;

$regex->startOfLine()
    ->then("http")
    ->maybe("s")
    ->then("://")
    ->maybe("www.")
    ->anythingBut(" ")
    ->endOfLine();

if ($regex->test("https://github.com/")) {
    echo "valid url";
} else {
    echo "invalid url";
}

if (preg_match($regex, 'http://github.com')) {
    echo 'valid url';
} else {
    echo 'invalid url';
}

echo "". $regex->getRegex() ."";

echo $regex->clean(array("modifiers" => "m", "replaceLimit" => 4))
    ->find(' ')
    ->replace("This is a small test http://somesite.com and some more text.", "-");
```

Other Implementations
---------------------

[](#other-implementations)

You can see an up to date list of all ports on [VerbalExpressions.github.io](http://VerbalExpressions.github.io).

- [Javascript](https://github.com/jehna/VerbalExpressions)
- [Ruby](https://github.com/VerbalExpressions/RubyVerbalExpressions)
- [C#](https://github.com/VerbalExpressions/CSharpVerbalExpressions)
- [Python](https://github.com/VerbalExpressions/PythonVerbalExpressions)
- [Java](https://github.com/VerbalExpressions/JavaVerbalExpressions)
- [C++](https://github.com/VerbalExpressions/CppVerbalExpressions)

Building the project and running the tests
------------------------------------------

[](#building-the-project-and-running-the-tests)

All tests are written using PHPUnit. Please ensure that you have it installed and run all tests before contributing.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

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

2636d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3434037?v=4)[Jimmy Yen](/maintainers/cawa0505)[@cawa0505](https://github.com/cawa0505)

---

Top Contributors

[![cawa0505](https://avatars.githubusercontent.com/u/3434037?v=4)](https://github.com/cawa0505 "cawa0505 (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cawa0505-verbal-expressions-php/health.svg)

```
[![Health](https://phpackages.com/badges/cawa0505-verbal-expressions-php/health.svg)](https://phpackages.com/packages/cawa0505-verbal-expressions-php)
```

###  Alternatives

[slam/php-cs-fixer-extensions

Slam extension of friendsofphp/php-cs-fixer

68968.2k21](/packages/slam-php-cs-fixer-extensions)[jubeki/laravel-code-style

Combine Custom Fixers with the ruleset of Laravel Pint to fix your code style in Laravel Applications/Packages.

56556.0k8](/packages/jubeki-laravel-code-style)[nette/coding-standard

41933.9k19](/packages/nette-coding-standard)[shopsys/coding-standards

Coding standards definition compatible with PSR-2

20276.8k20](/packages/shopsys-coding-standards)[facile-it/facile-coding-standard

Facile.it coding standard

10312.3k30](/packages/facile-it-facile-coding-standard)

PHPackages © 2026

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