男女疯狂一边摸一边做羞羞视频|啊好深好硬快点用力别停动态图|亚洲一区无码中文字幕|特级无码毛片免费视频播放▽|久久狠狠躁免费观看|国内精品久久久久久网站

分隔符

當使用 PCRE 函數的時(shí)候,模式需要由分隔符閉合包裹。 分隔符可以是任意非字母數字、非反斜線(xiàn)、非空白字符。 靜默忽略合法分隔符之前的空白字符。

經(jīng)常使用的分隔符是正斜線(xiàn)(/)、hash符號(#) 以及取反符號(~)。下面的例子都是使用合法分隔符的模式。

/foo bar/
#^[^0-9]$#
+php+
%[a-zA-Z0-9_-]%

It is also possible to use bracket style delimiters where the opening and closing brackets are the starting and ending delimiter, respectively. (), {}, [] and <> are all valid bracket style delimiter pairs.

(this [is] a (pattern))
{this [is] a (pattern)}
[this [is] a (pattern)]
<this [is] a (pattern)>
Bracket style delimiters do not need to be escaped when they are used as meta characters within the pattern, but as with other delimiters they must be escaped when they are used as literal characters.

如果需要在正則模式內匹配分隔符,必須使用反斜線(xiàn)轉義。如果分隔符經(jīng)常在 正則模式內出現, 最好使用其他分隔符以便提高可讀性。

/http:\/\//
#http://#
需要將一個(gè)字符串放入模式中使用時(shí),可以用 preg_quote() 函數對其進(jìn)行 轉義,它的第二個(gè)參數(可選)可以用于指定需要被轉義的分隔符。

可以在結束分隔符后面增加模式修飾符。 下面的例子是一個(gè)大小寫(xiě)不敏感的匹配:

#[a-z]#i

男女疯狂一边摸一边做羞羞视频|啊好深好硬快点用力别停动态图|亚洲一区无码中文字幕|特级无码毛片免费视频播放▽|久久狠狠躁免费观看|国内精品久久久久久网站