From edcfd31759594ec55ccbedaae7a763fafbb17805 Mon Sep 17 00:00:00 2001 From: carl Date: Fri, 20 Sep 2019 14:12:41 +1000 Subject: Tweak markdown to properly render html --- zh-tw/pcre-tw.html.markdown | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'zh-tw') diff --git a/zh-tw/pcre-tw.html.markdown b/zh-tw/pcre-tw.html.markdown index c9cdc537..5f681d46 100644 --- a/zh-tw/pcre-tw.html.markdown +++ b/zh-tw/pcre-tw.html.markdown @@ -13,7 +13,9 @@ lang: zh-tw 相容Perl正規表達式(Perl Compatible Regular Expressions, PCRE)是一個實作正規表達式的C語言函式庫。此函式庫在1997年被開發出來,在當時面對複雜字串處理時大多會選擇使用Perl。也因為如此,PCRE大多的正規表達式語法都很酷似Perl。PCRE語法被廣泛運用在許多大專案中,包括PHP、Apache、R等。 PCRE中的超字元(metacharacter)主要可以分為以下兩類: + * 在中括號外會被辨識的字元 + ``` \ 通用跳脫字元 ^ 字串開頭 或 行首 @@ -33,18 +35,17 @@ PCRE中的超字元(metacharacter)主要可以分為以下兩類: ``` * 在中括號內會被辨識的超字元,在中括號外會被視為字元集合使用 - + ``` - \ 通用跳脫字元 ^ 非字元集合的字,但只會抓到第一個符合的字元 - 字元範圍 [ POSIX字元集合(若後面接POSIX格式) ] 字元集合定義結束 - -``` +``` PCRE提供了一些通用的字元類型,可被當作字元集合使用 + ``` \d 任何數字字元 \D 任何非數字字元 -- cgit v1.2.3