最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
c# 验证中文 数字 整数的正则表达式
时间:2022-06-25 05:02:52 编辑:袖梨 来源:一聚教程网
c# 验证中文 数字 整数的正则表达式
整数
regex.ismatch(inputerstr, "^([0-9]{1,})$")
数字
regex.ismatch(inputerstr, "^([0-9]{1,}[.][0-9]*)$")
英文字母
bool bb = regex.ismatch("/sdfsdf/", @"^/[a-z]*/$");
看一款支持中文正则
string[] sentences =
{
"你",
"x"
};
bool find = false;
string spattern = this.content.text;
foreach (string s in sentences)
{
if (system.text.regularexpressions.regex.ismatch(spattern,s))
{
//找到了
}
else
{
//没有找到
}
相关文章
- 宇宙怪谈数字迷宫全部攻略分享 12-23
- 新三国志曹操传13期南华幻境8-1攻略 12-23
- 免费漫画网站畅读入口-免费漫画全网首页真人版 12-23
- 我在神界刷装备冰霜女神宝石搭配推荐 12-23
- 夸克网页版官方入口-夸克最新网址链接查询 12-23
- 艾尔登法环黑夜君临幽灵鹰是什么 幽灵鹰的作用与驾驭技巧详解 12-23