Regex: ignore case sensitivity

后端 未结 13 1815
孤城傲影
孤城傲影 2020-11-22 06:11

How can I make the following regex ignore case sensitivity? It should match all the correct characters but ignore whether they are lower or uppercase.

G[a-b]         


        
13条回答
  •  北恋
    北恋 (楼主)
    2020-11-22 06:58

    C#

    using System.Text.RegularExpressions;
    ...    
    Regex.Match(
        input: "Check This String",
        pattern: "Regex Pattern",
        options: RegexOptions.IgnoreCase)
    

    specifically: options: RegexOptions.IgnoreCase

提交回复
热议问题