I was hoping someone could help me with a pattern to split a string strictly on a character sequence of of three ^
, i.e, ^^^
Input: Sample-1^^^Sample-2
Output: String 1: Sample-1 and String-2: Sample-2
I tried \\^\\^\\^
and it works fine for the happy path. But if I give it a string like:
Input: Sample-1^^^^Sample-2
I get the output as:
String 1: Sample-1
String-2: ^Sample-2
I tried the pattern (\\^\\^\\^)
as well, but no luck.