title: How does String.split work?
body: <p>Why does the following code return the output below?
  I would expect that 2 and 3 provide the same string splitting of 1.</p>
  
  <pre><code>    Log.d(TAG, " 1 ---------------------------");
  String originalText = "hello. .hello1";
  
  Pattern p = Pattern.compile("[a-zA-Z]+|\\s|\\W|\\d");
  Matcher m = p.matcher(originalText);
  
   while (m.find()) { 
       Log.d(TAG, m.group(0)); 
   }
   Log.d(TAG, "2 --------------------------- " + originalText);
  
  String [] scrollString = p.split(originalText);
  
  int i;      
  for (i=0; i&lt;scrollString.length; i++)
      Log.d(TAG, scrollString[i]);
  
  Log.d(TAG, "3 --------------------------- " + originalText);
  
  scrollString = originalText.split("[a-zA-Z]+|\\s|\\W|\\d");
  
  
  for (i=0; i&lt;scrollString.length; i++)
      Log.d(TAG, scrollString[i]);
  </code></pre>
  
  <p>OUTPUT:</p>
  
  <pre><code>1 ---------------------------
  
  hello
  
  .
  
  .
  
  hello
  
  1
  
  2 ---------------------------
  
  3 --------------------------- 
  </code></pre>