标签:style blog http io ar color os sp for
简单版本:
Regex reg = new Regex(@"(?i)\bfrom\b(?![^\[\]]*\])\s+(\[[^\[\]]+\]|\S+)"); MatchCollection mc = reg.Matches(yourStr); foreach (Match m in mc) { richTextBox2.Text += m.Groups[1].Value + "\n"; }
Regex reg = new Regex(@"(?in)\b(from|(left|right|INNER)\s+join)\b(?![^\[\]]*\])\s+(?<table>\[[^\[\]]+\]|\S+)"); MatchCollection mc = reg.Matches(yourStr); foreach (Match m in mc) { richTextBox2.Text += m.Groups["table"].Value + "\n"; }
原帖: http://bbs.csdn.net/topics/330116986
标签:style blog http io ar color os sp for
原文地址:http://www.cnblogs.com/neru/p/4112585.html