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.4k↓50%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 1mo ago

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 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

2395d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d3a4f96500273f4c9a11d7d808f94052b8d95628d6099d7a8151d8a7de0e3d79?d=identicon)[RedactedProfile](/maintainers/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.

693313.8M34](/packages/composer-pcre)[spatie/regex

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

1.1k17.1M59](/packages/spatie-regex)[gherkins/regexpbuilderphp

PHP port of thebinarysearchtree/regexpbuilderjs

1.4k163.0k1](/packages/gherkins-regexpbuilderphp)[longman/ip-tools

PHP IP Tools for manipulation with IPv4 and IPv6

147245.6k6](/packages/longman-ip-tools)[cytopia/awesome-ci

Lot's of tools for git, file and static source code analysis.

3386.4k](/packages/cytopia-awesome-ci)[regex-guard/regex-guard

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

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

PHPackages © 2026

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