PHPackages                             redacteddevworks/preg\_match2 - 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. redacteddevworks/preg\_match2

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

redacteddevworks/preg\_match2
=============================

PHP Regex Matcher that returns the matched values

1.0.0(6y ago)11.6k↓80%MITPHP

Since Oct 18Pushed 6y ago1 watchersCompare

[ Source](https://github.com/RedactedProfile/preg_match2)[ Packagist](https://packagist.org/packages/redacteddevworks/preg_match2)[ RSS](/packages/redacteddevworks-preg-match2/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

preg\_match2
============

[](#preg_match2)

Why?
----

[](#why)

I simply would prefer if the built in preg\_match functions would just return the values instead of the current method of supplying a predefined array.

Installation
------------

[](#installation)

`composer require redacteddevworks/preg_match2`

Usage
-----

[](#usage)

```
require 'autoload.php';

$matches = preg_match2('/([\d])/', 'the quick 1 jumped over the lazy 2 dog');

```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

2449d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1039911?v=4)[Kyle Harrison](/maintainers/RedactedProfile)[@RedactedProfile](https://github.com/RedactedProfile)

---

Top Contributors

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

---

Tags

phppregregexregexMatchpreg\_match

### Embed Badge

![Health badge](/badges/redacteddevworks-preg-match2/health.svg)

```
[![Health](https://phpackages.com/badges/redacteddevworks-preg-match2/health.svg)](https://phpackages.com/packages/redacteddevworks-preg-match2)
```

###  Alternatives

[composer/pcre

PCRE wrapping library that offers type-safe preg\_\* replacements.

707347.9M60](/packages/composer-pcre)[spatie/regex

A sane interface for php's built in preg\_\* functions

1.1k19.8M70](/packages/spatie-regex)[gherkins/regexpbuilderphp

PHP port of thebinarysearchtree/regexpbuilderjs

1.3k189.0k1](/packages/gherkins-regexpbuilderphp)[yetanotherape/diff-match-patch

Port of the google-diff-match-patch (https://github.com/google/diff-match-patch) lib to PHP

159964.9k15](/packages/yetanotherape-diff-match-patch)[longman/ip-tools

PHP IP Tools for manipulation with IPv4 and IPv6

147256.8k7](/packages/longman-ip-tools)[regex-guard/regex-guard

A wrapper that allows you to validate regular expressions and handle normally uncatchable PCRE compilation warnings

24530.3k8](/packages/regex-guard-regex-guard)

PHPackages © 2026

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