using System.Text.RegularExpressions; static public bool RegexName(string str) { return Regex.IsMatch(str, @"^[\u4e00-\u9fa5_a-zA-Z0-9]+$"); }
C#正则表达式——网游角色起名仅允许汉字、字母、数字、底划线
阅读 70
2023-01-05
using System.Text.RegularExpressions; static public bool RegexName(string str) { return Regex.IsMatch(str, @"^[\u4e00-\u9fa5_a-zA-Z0-9]+$"); }
相关推荐
精彩评论(0)