able / reglib
phpABLE regular expressions library
v0.5.2
2021-05-23 02:29 UTC
Requires
- php: >=8.0.0
- able/helpers: ^0.9.0
Requires (Dev)
- phpunit/phpunit: ^9
This package is auto-updated.
Last update: 2024-12-15 01:20:28 UTC
README
The lightweight library provides a standardized way to use regular expressions in php including the most popular prepared templates.
Requirements
- PHP >= 8.0.0
- Able/Helpers
Install
Here's the simpler way to install the Able/Reglib package via composer:
composer require able/reglib
Usage
Now you can use library features anywhere in the code:
use \Able\Reglib; $Regex = new Regex('/vendor/'); echo $Regex->replace('vendor/reglib', 'able')); //> able/reglib
Or
use \Able\Reglib; $Regex = new Regex('/^[A-Za-z]+/'); echo $Regex->take('winter is coming')); //> winter
License
This package is released under the MIT license.