Consider a string like below with delimiter __|__
.
String str = "a_b__|__c_d";
str.split("__\\|__")
gives 2 splits a_b and c_d
StringUtils.split(str, "__|__") or StringUtils.split(str, "__\\|__")
gives 4 splits a, b, c, d which is not desired.
Is there any way to make StringUtils.split() to give same results String.split()?