title: Regex between double pipes
body: <p>I have been attempting to get all the values between a double piped string. </p>
  
  <p>My example string is below.</p>
  
  <pre><code>Item number 1 || Item number 2 || 168
  </code></pre>
  
  <p>Java Code as follows:</p>
  
  <pre><code>final String regex = "?????";
  final String string = "Item number 1 || Item number 2 || 168";
  
  final Pattern pattern = Pattern.compile(regex);
  final Matcher matcher = pattern.matcher(string);
  
  while (matcher.find()) {
     for (int i = 1; i &lt;= matcher.groupCount(); i++) {
        System.out.println(matcher.group(i));
  }
  </code></pre>
  
  <p>I would like for regex to split and remove whitespace leaving me with:</p>
  
  <ul>
  <li>Item number 1</li>
  <li>Item number 2</li>
  <li>168</li>
  </ul>
  
  <p>How can this be accomplished? I have not found a similar answer with double piping.</p>