110,536
社区成员
发帖
与我相关
我的任务
分享
string test = @"select * from tablea where name like %s
select * from tablea where id = s ";
Regex reg = new Regex(@"(%?)\bs\b");
string result = reg.Replace(test, "'$1张三'");
richTextBox2.Text = result;
//string s = "select * from tablea where name like %s ";
string s = "select * from tablea where id = s ";
Regex reg = new Regex(@"s[\W]");
s = reg.Replace(s, "张三");