title: Attempting AngularJS custom filter that pulls numbers out of block of text
body: <p>What I would like to create is a filter which will pull the numbers out of text that is put in a text box. For example:</p>
  
  <p>User types: The cat went to 4 stores and bought 3 bags of cat litter for 1 dollar.</p>
  
  <p>Result would be: [4, 3, 1]</p>
  
  <p>The filter will see because of a previous filter ['the', 'cat', 'went', 'to', '4' ...]</p>
  
  <p>So what I tried to create was a for loop that would go through the array and check each item to see if it is in fact a number. However, the for loop breaks the app when it isn't commented out. Any help is appreciated.</p>
  
  <pre><code>filter('showNum', function() {    
  //   this filter is not complete but it will return only numbers from an array
      return function isNumeric(title){
      var numbers, i, len, numberToAdd;
      numbers = [];
      len = title.length;
  
  //      for(i=0; i&lt;len; i+=1){
  //          numberToAdd = title[i]; 
  //          if(!isNAN(numberToAdd)===False);    {numbers.push(numberToAdd);} 
      return numbers;
        };
  
    })
  </code></pre>