Here is sample code from. as a separator:
String p = "hello.regex\\.brain\\.twister";
System.out.println( p );
for (String s : p.split( "(?<!\\\\)\\.", -1 )) {
System.out.println( "-> "+ s );
}
Will Ouptut:
hello.regex\.brain\.twister
-> hello
-> regex\.brain.\twister
source
share