title: Java Regex return contiguous words and numbers into arraylist
body: <p>I am trying to write a Java RegEx routine that will return an arraylist with the following requirements"</p>
  
  <ol>
  <li>Remove special characters</li>
  <li>Add a String to the arraylist of contiguous alpha characters and contiguous numeric characters.  </li>
  <li>A space or series of spaces is the delimiter.</li>
  </ol>
  
  <p>Here is the input:</p>
  
  <pre class="lang-none prettyprint-override"><code>Az ma9n,  66  a pk0 lan, a c55an*()al: Pan3afffma
  </code></pre>
  
  <p>Here is the expected output of what should be in the ArrayList: </p>
  
  <pre class="lang-none prettyprint-override"><code>Az, ma, 9, n, 66, a, pk, 0, lan, a, c, 55, an, al, Pan, 3, afffma
  </code></pre>
  
  <p>Here is what I have but it's not even close:</p>
  
  <pre><code>String test = "Az ma9n,  66  a pk0 lan, a c55an*()al: Pan3afffma";
  List&lt;String&gt; list = new ArrayList&lt;String&gt;();
  test = test.replaceAll("[^a-zA-Z0-9|\\s]", "");
  Matcher m = Pattern.compile("[a-z+A-Z+0-9+]").matcher(test);
  
  while(m.find()) {
      list.add(m.group());
  }
  
  System.out.println(list.toString());
  </code></pre>