求简单的正则表达式。。。 文本"123:234;321:123;789:987;"现在知道 "321:*;" 要获取 左边 *号里的数据。应该是 “123”; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 文本"123:234;321:123;789:987;" 保存到一个 string yy里 在用 string [ ] xx = yy.Split ( ' ; ' ) ;在foreach ( string item in xx){ if ( item.Split ( ' : ' ) [ 0 ] .Equals( " 321 " ) { string zz= item.Split ( ' : ' ) [ 1 ] }}我就这样 解·······对不对你的胃口就不知道了 string s = "123:234;321:123;789:987;"; Match m = Regex.Match(s, @"321:(\d+)"); Console.WriteLine(m.Groups[1]); string result = Regex.Match(yourStr,@"(?<=321:)\d+").Value; string问题 请问如何解决数据库备份问题 触发器调用后台程序 求C#中Winform中的随机数问题 关于如何实现命令行 这个正则表达式怎么解决? 帮帮忙我的选中删除那错了 求助一个C#图像处理 请教一个数据库连接问题 我的 win98 怎么安装不上 在 MS 中国下载的 .net SDK 中文版 windows server2008环境下异常无法定位,求助! 判断Combox中的值
在用 string [ ] xx = yy.Split ( ' ; ' ) ;
在foreach ( string item in xx)
{
if ( item.Split ( ' : ' ) [ 0 ] .Equals( " 321 " )
{
string zz= item.Split ( ' : ' ) [ 1 ]
}
}
我就这样 解·······对不对你的胃口就不知道了
string s = "123:234;321:123;789:987;"; Match m = Regex.Match(s, @"321:(\d+)"); Console.WriteLine(m.Groups[1]);