Suppose I have a string
String s = The | community | office | system | is here to help you with specific coding, algorithm, or language problems.
How can I extract all the words from string s into a list which is between the pipe delimiter?
So the list should save community, office, system.
I thought of using the following pattern. Will it work?
Matcher matcher = Pattern.compile("(\\|\\w+)").matcher(s);