Regex accent insensitive?

后端 未结 7 1721
天命终不由人
天命终不由人 2020-12-09 17:38

I need a Regex in a C# program.


I\'ve to capture a name of a file with a specific structure.

I used the \\w cha

7条回答
  •  佛祖请我去吃肉
    2020-12-09 18:32

    Case-insensite works for me in this example:

         string input =@"âãäåæçèéêëìíîïðñòóôõøùúûüýþÿı";
         string pattern = @"\w+";
         MatchCollection matches = Regex.Matches (input, pattern, RegexOptions.IgnoreCase);
    

提交回复
热议问题