title: Python 3, Listing all file names found in string
body: <p>The following string example uses <code>.swf</code></p>
  
  <pre><code>&lt;name="echo" value="2010a.swf"&gt;&lt;ie=tango v="bolder.swf"&gt;&lt;val=="backstreetboys+AreBack.swf"&gt;
  </code></pre>
  
  <p>What is the best method to extract all .swf names using their corresponding <strong>="</strong> string as the hook.</p>
  
  <p>The first code I considered was something like this:</p>
  
  <pre><code>cnt = 0
  holdResults = []
  while bla.find('.swf', cnt) != -1:
      holdResults.insert(len(holdResults), bla[bla.find('.swf', cnt):-1])
      cnt = bla.find('.swf', cnt)
      cnt = cnt+1
  
  print(holdResults)
  </code></pre>
  
  <p>The roadblock I'm at with the above code is the <code>:-1])</code> part ...</p>
  
  <p>I could loop backwards one character at a time until finding the corresponding <strong>="</strong> ... but this doesn't seem ideal or fast, especially when customizing the <code>='</code> hook to something else or lengthen it.</p>
  
  <p>Is there a faster more effective way of doing this?</p>
  
  <p>Thanks!</p>