1. 首页
  2. 数据库
  3. 其它
  4. regex:PHP内置preg_ *函数的合理接口 源码

regex:PHP内置preg_ *函数的合理接口 源码

上传者: 2021-04-26 06:24:55上传 ZIP文件 13.97KB 热度 5次
使正则表达式再次变得很棒 Php内置的preg_*函数需要一些奇怪的模式,例如通过引用传递变量以及将false或null值视为错误。 spatie/regex为preg_match , preg_match_all , preg_replace和preg_replace_callback提供了更spatie/regex接口。 use Spatie \ Regex \ Regex ; // Using `match` Regex :: match ( '/a/' , 'abc' ); // `MatchResult` object Regex :: match ( '/a/' , 'abc'
下载地址
用户评论