mpociot / human-regex
为人类而非机器设计的正则表达式
dev-master
2016-08-30 09:28 UTC
Requires
- php: >=7.0
Requires (Dev)
- phpunit/phpunit: 5.*
This package is auto-updated.
Last update: 2024-09-08 00:47:13 UTC
README
为人类而非机器设计的正则表达式
安装
您可以通过composer安装此包
composer require mpociot/human-regex
使用方法
$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了解最近的变化。
测试
$ composer test
贡献
有关详细信息,请参阅CONTRIBUTING。
安全
如果您发现任何安全相关的问题,请通过m.pociot@gmail.com发送电子邮件,而不是使用问题跟踪器。
鸣谢
许可协议
MIT许可协议(MIT)。有关更多信息,请参阅许可文件。