Sometimes we can't
rename a file automatically when the Filename has "/"
inside them because of Windows limitations. This code might prove
handy in these situations.
1 2 3 4 5 6 7 8 9 | //Code to Remove Certain Characters from a Java Input// try { String Y = X; String regx = "/" ; char [] ca = regx.toCharArray(); for ( char c : ca) { Y = Y.replace( "" + c, "" ); } |