human-regex
                                
                                 human-regex copied to clipboard
                                
                                    human-regex copied to clipboard
                            
                            
                            
                        Regular expressions for human beings, not machines
HumanRegex
Regular expressions for human beings, not machines
Installation
You can install the package via composer:
composer require mpociot/human-regex
Usage
$regex = HumanRegex::create()
    ->alphanumerics()
    ->then('-')
    ->digits()->exactly(4)
    ->then('-')
    ->digits()->exactly(2)
    ->then('-')
    ->digits()->exactly(2)
    ->then('.')
    ->thenEither('mov')->or('mp4');
    
$regex->matches('foobar-2016-08-29.mp4');
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Marcel Pociot
- All Contributors
License
The MIT License (MIT). Please see License File for more information.