title: How to get all matches from regex?
body: <p>I would like to get all occurrences of <code>[0-9A-Z]+?</code> for processing later.
  I do have </p>
  
  <pre><code>if [[ `cat file` =~ '[0-9A-Z]+?' ]]; then
    echo $BASH_REMATCH;
  fi
  </code></pre>
  
  <p>Which gives me first match, but how could I process all the matches in the file?</p>
  
  <p>Thank you</p>