正则表达式模式';pL';做


What does the regex pattern 'pL' do?

有一个常用的Regex用于混淆URL ~[^''pL'd]+~u,但第一个preg_replace()中的''pL是什么意思?

以下是一些例子:

  • 如何替换":"用"/"在泥泞的功能
  • http://snipplr.com/view/22741/slugify-a-string-in-php/
  • http://sourcecookbook.com/en/recipes/8/function-to-slugify-strings-in-php
  • http://www.daniweb.com/web-development/php/threads/471380/php-slugify-two-variables-together

''pL是Unicode属性快捷方式。它也可以写成'p{L}'p{Letter}。它匹配任何语言的任何类型的字母。

''pL''p{L} 的简写

参考

除了标准表示法之外,''p{L}、Java、PHP、Perl、PCRE和JGsoft引擎还允许您使用缩写''pL。简写只适用于单字母Unicode属性。''pLl不是'' p{Ll}的等价物。它相当于''p{L}l它匹配Al或àl或任何后面跟着文字l的Unicode字母。