https://github.com/redactedprofile/preg_match2
PHP's preg_match functions are great by themselves, but they only return a true or false value. I've always felt returning the matches themselves was a cleaner idea than updaing a reference passed empty array
https://github.com/redactedprofile/preg_match2
php preg regex
Last synced: about 1 year ago
JSON representation
PHP's preg_match functions are great by themselves, but they only return a true or false value. I've always felt returning the matches themselves was a cleaner idea than updaing a reference passed empty array
- Host: GitHub
- URL: https://github.com/redactedprofile/preg_match2
- Owner: RedactedProfile
- License: mit
- Created: 2019-10-18T20:39:48.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-18T21:08:26.000Z (over 6 years ago)
- Last Synced: 2025-02-14T05:17:29.643Z (over 1 year ago)
- Topics: php, preg, regex
- Language: PHP
- Homepage:
- Size: 1.95 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
preg_match2
===========
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');
```