title: Split string with regular expression
body: <p>I have been trying to split a string using regular expression in android without any success.</p>
  
  <p>The string is formatted like this <strong>id;value|</strong>
  For example :</p>
  
  <pre><code>String valueString = "20;somevalue|4;anothervalue|10;athirdvalue|5;enoughwithvaluesalready";
  </code></pre>
  
  <p>I use this method to try o split the string.</p>
  
  <pre><code>public void splitString(String valueString){
      Pattern p = Pattern.compile("([\\d]+);([^\\|]+)");
      Matcher m = p.matcher(valueString);  
      boolean matches = m.matches();
  }
  </code></pre>
  
  <p>When I run it in the <a href="http://rubular.com/r/dGDvQrIV7d" rel="nofollow">Rubular-regex-editor</a> it looks fine, in Android no matches are found. Any ideas? </p>