How to replace special character and its next string with one string

前端 未结 4 1675
无人共我
无人共我 2021-01-22 16:30

How to replace the special character $owner with \"hr\" and $table_name with \"hr\" and $constraint_name with \"scma_constraint\" in dynamic. Change

\"alter ta         


        
4条回答
  •  情歌与酒
    2021-01-22 17:00

    String.replace()

    String myString = "...";
    myString = myStrign
             .replace("$owner", "hr")
             .replace("$table_name", "hr")
             .replace("$constraint_name", "blah");
    

提交回复
热议问题