PHPackages                             zero-to-prod/regex-email - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. zero-to-prod/regex-email

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

zero-to-prod/regex-email
========================

A regular expression to check an email string

v71.1.0(8mo ago)117.2k↓28%2MITDockerfilePHP &gt;=7.1CI passing

Since Nov 12Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/zero-to-prod/regex-email)[ Packagist](https://packagist.org/packages/zero-to-prod/regex-email)[ Docs](https://github.com/zero-to-prod/regex-email)[ Fund](https://github.com/sponsors/zero-to-prod)[ RSS](/packages/zero-to-prod-regex-email/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (2)Versions (7)Used By (2)

Zerotoprod\\RegexEmail
======================

[](#zerotoprodregexemail)

[![](art/logo.png)](art/logo.png)

[![Repo](https://camo.githubusercontent.com/9a90a3efeee26aed7d7f2feee9cd84566a26f9c362cc773b184d076210906e1c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6769746875622d677261793f6c6f676f3d676974687562)](https://github.com/zero-to-prod/regex-email)[![GitHub Actions Workflow Status](https://camo.githubusercontent.com/1fa6aa9a932051d56c592faff8ae5ed266eb50f8bfbfe44c00daa13227e8f129/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7a65726f2d746f2d70726f642f72656765782d656d61696c2f746573742e796d6c3f6c6162656c3d74657374)](https://github.com/zero-to-prod/regex-email/actions)[![GitHub Actions Workflow Status](https://camo.githubusercontent.com/f0992f7889421c37176a2f8b211c2f1c891c142a88f867424c925b412022dfdf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7a65726f2d746f2d70726f642f72656765782d656d61696c2f6261636b77617264735f636f6d7061746962696c6974792e796d6c3f6c6162656c3d6261636b77617264735f636f6d7061746962696c697479)](https://github.com/zero-to-prod/regex-email/actions)[![Packagist Downloads](https://camo.githubusercontent.com/d365c0605bdb27dd631e26a0b71eaeb19740699ef214cd081547d5df25c39817/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a65726f2d746f2d70726f642f72656765782d656d61696c3f636f6c6f723d626c7565)](https://packagist.org/packages/zero-to-prod/regex-email/stats)[![php](https://camo.githubusercontent.com/60efe9e6231e12b21b4357e30d08add38db45c295a28a41b4d274cfe0cb2aa0c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7a65726f2d746f2d70726f642f72656765782d656d61696c2e7376673f636f6c6f723d707572706c65)](https://packagist.org/packages/zero-to-prod/regex-email/stats)[![Packagist Version](https://camo.githubusercontent.com/07df66c3f902a70183509ed928fc65d5e35ad500c87933ffdfb471a35b6caec2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a65726f2d746f2d70726f642f72656765782d656d61696c3f636f6c6f723d663238643161)](https://packagist.org/packages/zero-to-prod/regex-email)[![License](https://camo.githubusercontent.com/1aca7c02bf2ff9f79b2272309523b777013251e99186afe66ba7f4d473c3439f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7a65726f2d746f2d70726f642f72656765782d656d61696c3f636f6c6f723d70696e6b)](https://github.com/zero-to-prod/regex-email/blob/main/LICENSE.md)[![wakatime](https://camo.githubusercontent.com/db549510a8f5463ca22cc82dfe673e9372ae62cc9d158602d1b42a0faaaf1dce/68747470733a2f2f77616b6174696d652e636f6d2f62616467652f6769746875622f7a65726f2d746f2d70726f642f72656765782d656d61696c2e737667)](https://wakatime.com/badge/github/zero-to-prod/regex-email)[![Hits-of-Code](https://camo.githubusercontent.com/cc32c5a4c81382b4b7af7ac2eaed8c10bad563b65820241ad5bb03f992ae9b3b/68747470733a2f2f686974736f66636f64652e636f6d2f6769746875622f7a65726f2d746f2d70726f642f72656765782d656d61696c3f6272616e63683d6d61696e)](https://hitsofcode.com/github/zero-to-prod/regex-email/view?branch=main)

Contents
--------

[](#contents)

- [Introduction](#introduction)
- [Requirements](#requirements)
- [Installation](#installation)
- [Documentation Publishing](#documentation-publishing)
    - [Automatic Documentation Publishing](#automatic-documentation-publishing)
- [Usage](#usage)
- [Local Development](./LOCAL_DEVELOPMENT.md)
- [Contributing](#contributing)

Introduction
------------

[](#introduction)

A regular expression to check an Email string.

Requirements
------------

[](#requirements)

- PHP 7.1 or higher.

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

[](#installation)

Install `Zerotoprod\RegexEmail` via [Composer](https://getcomposer.org/):

```
composer require zero-to-prod/regex-email
```

This will add the package to your project's dependencies and create an autoloader entry for it.

Documentation Publishing
------------------------

[](#documentation-publishing)

You can publish this README to your local documentation directory.

This can be useful for providing documentation for AI agents.

This can be done using the included script:

```
# Publish to default location (./docs/zero-to-prod/regex-email)
vendor/bin/zero-to-prod-regex-email

# Publish to custom directory
vendor/bin/zero-to-prod-regex-email /path/to/your/docs
```

### Automatic Documentation Publishing

[](#automatic-documentation-publishing)

You can automatically publish documentation by adding the following to your `composer.json`:

```
{
    "scripts": {
        "post-install-cmd": [
            "zero-to-prod-regex-email"
        ],
        "post-update-cmd": [
            "zero-to-prod-regex-email"
        ]
    }
}
```

Usage
-----

[](#usage)

```
Zerotoprod\RegexEmail\RegexEmail::pattern;
```

Contributing
------------

[](#contributing)

Contributions, issues, and feature requests are welcome! Feel free to check the [issues](https://github.com/zero-to-prod/regex-email/issues) page if you want to contribute.

1. Fork the repository.
2. Create a new branch (`git checkout -b feature-branch`).
3. Commit changes (`git commit -m 'Add some feature'`).
4. Push to the branch (`git push origin feature-branch`).
5. Create a new Pull Request.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance59

Moderate activity, may be stable

Popularity28

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity38

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.

###  Release Activity

Cadence

Every ~58 days

Total

6

Last Release

260d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/502649f05d36c87d494988bd99193a4d908d345335d99c080928a726277371f5?d=identicon)[zero-to-prod](/maintainers/zero-to-prod)

---

Top Contributors

[![zero-to-prod](https://avatars.githubusercontent.com/u/61474950?v=4)](https://github.com/zero-to-prod "zero-to-prod (14 commits)")

---

Tags

emailphpregexzero-to-prodemail regexregex-email

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zero-to-prod-regex-email/health.svg)

```
[![Health](https://phpackages.com/badges/zero-to-prod-regex-email/health.svg)](https://phpackages.com/packages/zero-to-prod-regex-email)
```

###  Alternatives

[zero-to-prod/data-model

Transforms Data into Type-Safe DTOs.

14226.2k32](/packages/zero-to-prod-data-model)

PHPackages © 2026

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