redacteddevworks / preg_match2
PHP Regex Matcher that returns the matched values
1.0.0
2019-10-18 21:00 UTC
This package is auto-updated.
Last update: 2026-03-22 08:06:00 UTC
README
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
composer require redacteddevworks/preg_match2
Usage
require 'autoload.php';
$matches = preg_match2('/([\d])/', 'the quick 1 jumped over the lazy 2 dog');