question related to this
I have a string
a\\;b\\\\;c;d
which in Java looks like
String s = \"a\\\\;b\\\\\\\\;c;d\"
This approach assumes that your string will not have char '\0' in your string. If you do, you can use some other char.
public static String[] split(String s) {
String[] result = s.replaceAll("([^\\\\])\\\\;", "$1\0").split(";");
for (int i = 0; i < result.length; i++) {
result[i] = result[i].replaceAll("\0", "\\\\;");
}
return result;
}