mfdj/regsexy

使用简洁、流畅的接口优雅地创建和处理正则表达式。

0.2.0 2014-04-01 02:22 UTC

This package is not auto-updated.

Last update: 2024-09-28 15:18:36 UTC


README

Latest Stable Version Build Status Code Coverage

这是一个使用语法糖、简洁性和一致性抽象preg_*函数族库,让你跟上[混乱中的好事](http://rapgenius.com/Ice-cube-it-was-a-good-day-lyrics#note-9194,'Ice Cube - Today Was a Good Day')。

特点

  • 精简、易于阅读的语法
  • 流畅的接口
use RegSexy\RegEx;

$subject = 'Cats are pretty funny I love, that, what is called… "ICanHasCheezburger?"!, '
         . 'is pretty great… but *really* I\'m more of a dog person. Got 2 little Chihuahuas at home!';

var_dump(
    RegEx::make( '(Chihuahua|Dachsund|Corgi)s' )
        ->match( $subject )
        ->match
);

致敬

本项目受到以下项目的启发

许可证

Creative Commons License
RegSexyMark Fox 许可,受Creative Commons Attribution-ShareAlike 3.0 Unported License保护。