public static void main(String[] args) { String str="upload\\media\\201904\\i4Qjz8E40xGQovUq-2CMi-HrBaUrGFZhv9konAyx0Yg.jpg"; String result=str.replaceAll("\\\\", "/"); System.out.println(result); }
转载于:https://www.cnblogs.com/jiefu/p/10797525.html