Skip to content

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

License

Notifications You must be signed in to change notification settings

RedactedProfile/preg_match2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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');

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages