What does the regex pattern #39;pL#39; do?(正则表达式模式做什么?)
问题描述
有一个常用的正则表达式用于标识URL~[^\pLd]+~u
,但是第一个preg_replace()
中的\pL
是什么意思?
以下是一些示例:
- How can I replace ":" with "/" in slugify function?
- 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
unicode
\pL
是推荐答案属性快捷方式。也可以写为p{L}
或p{Letter}
。它可以匹配来自任何语言的任何类型的字母。
这篇关于正则表达式模式做什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!