PHPackages                             lyteworx/common-regex2-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. lyteworx/common-regex2-php

ActiveLibrary

lyteworx/common-regex2-php
==========================

Find a lot of kinds of common information in a string

071PHP

Since Jun 24Pushed 4y agoCompare

[ Source](https://github.com/Lyteworx/CommonRegex2PHP)[ Packagist](https://packagist.org/packages/lyteworx/common-regex2-php)[ RSS](/packages/lyteworx-common-regex2-php/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

CommonRegex2PHP
===============

[](#commonregex2php)

> Forked from james2doyle/CommonRegexPHP ()

Adding Additional Regex searches.

> Migrated from [talyssonoc/CommonRegexJS](https://github.com/talyssonoc/CommonRegexJS)

[CommonRegex](https://github.com/madisonmay/CommonRegex/ "CommonRegex") port for PHP

Find a lot of kinds of common information in a string.

Pull requests welcome!

Please note that this is currently English/US specific.

Usage
=====

[](#usage)

```
composer require lyteworx/common-regex2-php

```

Then somewhere in the code:

```
$parser = new CommonRegexPHP;
$results = $parse('See you at 12:00AM on March 22nd 2018');
// returns [
//     'dates' => [
//         'March 22nd 2018',
//     ],
//     'times' => [
//         '12:00AM',
//     ],
// ]

// shorthand
$results = (new CommonRegexPHP)('See you at 12:00AM on March 22nd 2018');
```

Running Tests
=============

[](#running-tests)

```
composer install
composer run test

```

CommonRegex Ports
=================

[](#commonregex-ports)

There are CommonRegex ports for other languages, see [here](https://github.com/madisonmay/CommonRegex/#commonregex-ports "CommonRegex ports")

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/068fc6b44243568716683ed866f4e71f9817c9acf3c7fc681941a94f6da957d7?d=identicon)[ahpetrot](/maintainers/ahpetrot)

---

Top Contributors

[![james2doyle](https://avatars.githubusercontent.com/u/1425304?v=4)](https://github.com/james2doyle "james2doyle (3 commits)")

### Embed Badge

![Health badge](/badges/lyteworx-common-regex2-php/health.svg)

```
[![Health](https://phpackages.com/badges/lyteworx-common-regex2-php/health.svg)](https://phpackages.com/packages/lyteworx-common-regex2-php)
```

PHPackages © 2026

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