String sql="from User full outer join Book where username=' where is '' order by ' order by User.userId desc";求一正则表达式,将单引号之间的数据替换为?,连续的两个单引号不处理String result=sql.replaceAll(正则表达式,"?");result结果为: from User full outer join Book where username=? order by User.userId desc
这里应该为:' where is ' 吧???LZ是不是写错了
System.out.println(sql.replaceAll(regex, "?"));
估意将条件写成 ' where is '' order by '的这个与需要的正则表达式没啥关系的,哈