- Java code
sql = "update tour set "; sql += "Link_Tel=?,"; sql += "View_Name=?,"; sql += "Ticket_express_Service=?,"; sql += "Line_Area=?,"; sql += "View_Intro='" + all.getView_Intro() + "',"; sql += "Service_Item='" + all.getService_Item() + "',"; sql += "View_Ticket='" + all.getView_Ticket() + "',"; sql += "View_Kind='" + all.getView_Kind() + "',"; sql += "Open_Time='" + all.getOpen_Time() + "',"; sql += "Agency_Grade='" + all.getAgency_Grade() + "',"; sql += "View_Line='" + all.getView_Line() + "',"; sql += "Ticket_booking_Service='" + all.getTicket_booking_Service() + "',"; sql += "View_Grade='" + all.getView_Grade() + "',"; sql += "View_Facility='" + all.getView_Facility() + "',";
我需要把其中的 '" + all.*** + "', 通通换成 ?,
myeclipce里面怎么写替换规则?
------解决方案--------------------
'"[ ]*\+[ ]*all\..*\(\)[ ]*\+[ ]*"'
------解决方案--------------------
'"[ ]*\+[ ]*all\..*\(\)[ ]*\+[ ]*"'从你的sql代码中match出9次,测试成功,放心使用吧