Reputation: 233
I want to split string.
for example)
str1=str\|2|str3=str4
result)
str1=str\|2 str3=str4
how to split it using pattern in java?
Upvotes: 3
Views: 315
Reputation: 32827
Use this regex to split
(?<=\\|\\d)\\| -- | |->kept | out so it doesnt get included in the result!
check it out here
Upvotes: 2