标签:
using System.Text.RegularExpressions;
英文
Regex.IsMatch("字符串", @"^[a-zA-Z0-9_\u4e00-\u9fa5]+$")
中文
Regex.IsMatch("字符串", @"^\w+$"))
IP
Regex.IsMatch(ftpServerIP, @"^((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?)$")
标签:
原文地址:http://www.cnblogs.com/xieqianli/p/4216455.html