redacteddevworks/preg_match2

PHP 正则表达式匹配器,返回匹配的值

1.0.0 2019-10-18 21:00 UTC

This package is auto-updated.

Last update: 2024-09-22 04:36:46 UTC


README

原因是什么?

我更希望内置的 preg_match 函数直接返回值,而不是当前提供预定义数组的方法。

安装

composer require redacteddevworks/preg_match2

用法

require 'autoload.php';

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