PHPackages                             opis/pattern - 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. opis/pattern

Abandoned → [opis/utils](/?search=opis%2Futils)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

opis/pattern
============

A library that will help you defining patterns and build a valid regex for them

1.0.0(8y ago)42.3k12Apache-2.0PHPPHP &gt;=7.0.0

Since May 30Pushed 6y ago2 watchersCompare

[ Source](https://github.com/opis/pattern)[ Packagist](https://packagist.org/packages/opis/pattern)[ Docs](http://opis.io)[ RSS](/packages/opis-pattern/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (1)Versions (2)Used By (2)

Opis Pattern
============

[](#opis-pattern)

[![Build Status](https://camo.githubusercontent.com/34434dd794341f63d24fced3e430f83f06278e8557f6e920ca86515324f35416/68747470733a2f2f7472617669732d63692e6f72672f6f7069732f7061747465726e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/opis/pattern)[![Latest Stable Version](https://camo.githubusercontent.com/a2b8dda1db518053fb25408946bdc47d5058eb3f27737e9eb2f4d3fcff73044c/68747470733a2f2f706f7365722e707567782e6f72672f6f7069732f7061747465726e2f76657273696f6e2e706e67)](https://packagist.org/packages/opis/pattern)[![Latest Unstable Version](https://camo.githubusercontent.com/2dd8a7674836a67d5d51bb7728ec624e1a777e117b86c1d38f50648c61422969/68747470733a2f2f706f7365722e707567782e6f72672f6f7069732f7061747465726e2f762f756e737461626c652e706e67)](https://packagist.org/packages/opis/pattern)[![License](https://camo.githubusercontent.com/e94de6e789267c3ef93538b2b7704ba7fa1375b1c141e8d8f4de3650fa4889d8/68747470733a2f2f706f7365722e707567782e6f72672f6f7069732f7061747465726e2f6c6963656e73652e706e67)](https://packagist.org/packages/opis/pattern)

Build RegEx from customizable patterns.

Documentation
-------------

[](#documentation)

Documentation and examples can be found [here](https://www.opis.io/pattern).

### License

[](#license)

**Opis Pattern** is licensed under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0).

### Requirements

[](#requirements)

- PHP 7.0 or higher

### Installation

[](#installation)

This library is available on [Packagist](https://packagist.org/packages/opis/pattern)and can be installed from a command line interface by using [Composer](https://getcomposer.org).

```
composer require opis/pattern
```

Or you could directly reference it into your `composer.json` file as a dependency

```
{
    "require": {
        "opis/pattern": "^1.0.0"
    }
}
```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60% 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

2946d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/47afaf3c711dd321c8d09bae2afed928971ec9e9a7593c925749696f04d2fddd?d=identicon)[msarca](/maintainers/msarca)

![](https://www.gravatar.com/avatar/7c720b40eb280d9fd33cc35d74c34b3763c2777bd2502d094625faa367f0dca4?d=identicon)[sorinsarca](/maintainers/sorinsarca)

---

Top Contributors

[![sorinsarca](https://avatars.githubusercontent.com/u/3427195?v=4)](https://github.com/sorinsarca "sorinsarca (18 commits)")[![msarca](https://avatars.githubusercontent.com/u/5808737?v=4)](https://github.com/msarca "msarca (12 commits)")

---

Tags

regexopispattern

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/opis-pattern/health.svg)

```
[![Health](https://phpackages.com/badges/opis-pattern/health.svg)](https://phpackages.com/packages/opis-pattern)
```

###  Alternatives

[composer/pcre

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

703335.6M52](/packages/composer-pcre)[spatie/regex

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

1.1k18.9M68](/packages/spatie-regex)[league/pipeline

A plug and play pipeline implementation.

1.0k16.8M84](/packages/league-pipeline)[gherkins/regexpbuilderphp

PHP port of thebinarysearchtree/regexpbuilderjs

1.3k181.3k1](/packages/gherkins-regexpbuilderphp)[opis/string

Multibyte strings as objects

7424.5M8](/packages/opis-string)[redeyeventures/geopattern

Generate beautiful SVG patterns.

11195.0k3](/packages/redeyeventures-geopattern)

PHPackages © 2026

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