title: How to extract all pattern matches from one line into a list
body: <p>The goal is to extract all strings matching a pattern from one line of text and to display the results as a list.</p>
  
  <p>For instance:</p>
  
  <pre><code>pattern="as[^\',]+?\.bin"
  line="[['Directory of boot:/', '', '81 -rwx 110665728 17:33:44 Mar 25 2018 asa992-smp-k8.bin', '82 -rwx 32738292 17:33:44 Mar 25 2018 asdm-79247.bin', '83 -rwx 59123840 17:33:44 Mar 25 2018 asa-restapi-132300-lfbff-k8.SPA', '', '3 file(s) total size: 202527860 bytes', '534495232 bytes total (331800576 bytes free/62% free)']]"
  </code></pre>
  
  <p>I tried:</p>
  
  <pre><code>echo $line | sed -E "s|.* (${pattern}).*|\1|g"
  asdm-79247.bin
  </code></pre>
  
  <p>I expect:</p>
  
  <pre><code>asa992-smp-k8.bin
  asdm-79247.bin
  </code></pre>
  
  <p>Any suggestion?</p>
  
  <p>If it is not possible with sed, I'm open to any other tool.</p>