0
点赞
收藏
分享

微信扫一扫

C#正则表达式——网游角色起名仅允许汉字、字母、数字、底划线

辰鑫chenxin 2023-01-05 阅读 70


using System.Text.RegularExpressions; static public bool RegexName(string str) { return Regex.IsMatch(str, @"^[\u4e00-\u9fa5_a-zA-Z0-9]+$"); }



 

举报

相关推荐

0 条评论