I am reading an XML file obtained from a web service. I have an LinkedList<String>
variable in which it contains a string. In that string there are certain words which I need to split. An example of a string contained in one of the elements in the LinkedList is like this:
"happy|elated|good"
I basically need get the string by splitting it where it meets the | symbol. I tried splitting it by using .split("|");
but that splitted it to single characters and not words. I then tried [^|] and that did nothing.
Im writing this in java.
EDIT = Nevermind,found out the problem. Forgot the \ in the regex