Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here


PHP Regular expressions made easy

Subscribe to updates I use PHPVerbalExpressions

Statistics on PHPVerbalExpressions

Number of watchers on Github 2056
Number of open issues 1
Average time to close an issue 7 months
Main language PHP
Average time to merge a PR 1 day
Open pull requests 2+
Closed pull requests 2+
Last commit over 1 year ago
Repo Created about 6 years ago
Repo Last Updated over 1 year ago
Size 73 KB
Organization / Authorverbalexpressions
Page Updated
Do you use PHPVerbalExpressions? Leave a review!
View PHPVerbalExpressions activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating PHPVerbalExpressions for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

Build Status


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

// some tests

$regex = new VerbalExpressions();

      ->anythingBut(" ")

if ($regex->test("")) {
    echo "valid url". '<br>';
} else {
    echo "invalid url". '<br>';

if (preg_match($regex, '')) {
    echo 'valid url';
} else {
    echo 'invalid url';

echo "<pre>". $regex->getRegex() ."</pre>";

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

Other Implementations

You can see an up to date list of all ports on

Building the project and running the tests

The project supports Composer so you have to install Composer first before project setup.

curl -sS | php
php composer.phar install --dev
ln -s vendor/phpunit/phpunit/phpunit.php phpunit
PHPVerbalExpressions open pull requests (View All Pulls)
  • add VerbalExpressionScenario
  • add digit method
PHPVerbalExpressions list of languages used
Other projects in PHP