I\'m importing a CSV file to MySQL database. This can be done using java.mysql support for forward slash in file path. If user gives the path
java.mysql
c
In java, use this:
str = str.replace("\\", "/");
Note that the regex version of replace, ie replaceAll(), is not required here; replace() still replaces all occurrences of the search term, but it searches for literal Strings, not regex matches.