Skip to content

Instantly share code, notes, and snippets.

@LinZap
Last active March 2, 2023 08:41
Show Gist options
  • Save LinZap/1e203e9b719580011c8c3ab95dceb394 to your computer and use it in GitHub Desktop.
Save LinZap/1e203e9b719580011c8c3ab95dceb394 to your computer and use it in GitHub Desktop.
RegExp 支援自訂正規表達式選項

RegExp 支援自訂正規表達式選項

版本:ZapLib v2.4.3

RegExp 支援自訂正規表達式選項 (原本強制只能 RegexOptions.IgnoreCase)

使用範例

RegExp reg = new RegExp(@"[A-Z]123456789",RegexOptions.None); // 區分大小寫

string[] res1 = reg.Exec("A123456789"); // ["A123456789"]

string[] res2 = reg.Exec("a123456789"); // [ ]

回 ZapLib v2.4.3 changelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment