title: Extracting .mp3 files and names from an .m3u file
body: <p>I'm working on a website that lists music for a user to chose from that based on data in a json file. The file contains information like the album name, artist, year it was released, the number of tracks etc. and, where I'm struggling, an .m3u file containing a playlist for all the songs on that album.</p>
  
  <p>I'm not having a problem actually playing the .m3u file but my problem comes where I need to extract the .mp3 file names from the .m3u file and display them in a list on the website so the user can see the songs on the album before they play it or choose individual songs to listen to. </p>
  
  <p>I have everything in place to display a list, even using the number of tracks data from the json file to make sure it's the right length, but I'm struggling with a way to extract this data.</p>
  
  <p>Here's an example of one of the files;</p>
  
  <pre><code>#EXTM3U
  
  #EXTINF:9,Horrible Theme
  mp3/01 - Horrible Theme.mp3
  
  #EXTINF:114,My Freeze Ray
  mp3/02 - My Freeze Ray.mp3
  
  #EXTINF:35,Bad Horse Chorus
  mp3/03 - Bad Horse Chorus.mp3
  </code></pre>
  
  <p>And so on all the way down to the final file</p>
  
  <pre><code>#EXTINF:132,Horrible Credits
  mp3/14 - Horrible Credits.mp3
  </code></pre>
  
  <p>I'm not sure if this will be a problem, but there are also some .m3u files that I need to extract the .mp3 file names from that have all data on a single line. Like this;</p>
  
  <pre><code>#EXTM3U#EXTINF:9,Horrible Thememp3/01 - Horrible Theme.mp3#EXTINF:114,My Freeze Raymp3/02 - My Freeze Ray.mp3#EXTINF:35,Bad Horse Chorusmp3/03 - Bad Horse Chorus.mp3
  </code></pre>
  
  <p>I was wondering if anyone has dealt with something similar to this before and whether or not they could help explain how this might be done using jquery?</p>
  
  <p>Thanks.</p>