日期:2014-05-18 浏览次数:20700 次
private void TestRegex19() { string yourStr = @"char szAccept[] = ""Accept: */*""; char szReferer[] = ""Referer: http://mail.sina.com.cn/\r\n""; "; string result = Regex.Replace(yourStr, @"(?isn)(?<front>char\s*(?!\d)\w+\w*?(\[\]|\*) *= *)(?<text>"".*?"")(?<end> *;)", "$1L$2$3"); MessageBox.Show(result); }