C# - 雜項構造



下表列出了各種雜項構造 -

構造 定義 示例
(?imnsx-imnsx) 設定或停用模式中間的選項,例如不區分大小寫。 \bA(?i)b\w+\b 匹配 "ABA"、"Able" 在 "ABA Able Act" 中
(?#comment) 內聯註釋。註釋在第一個右括號處結束。 \bA(?#Matches words starting with A)\w+\b
# [到行尾] X 模式註釋。註釋從一個未轉義的 # 開始,一直持續到行尾。 (?x)\bA\w+\b#Matches words starting with A
csharp_regular_expressions.htm
廣告
© . All rights reserved.