dhcrusoe Posted June 15, 2009 Share Posted June 15, 2009 Hey all, I'm working on a relatively simple regex to strip the test.mp3 (filename) from the following code: <a href="http://www.wowshowcase.org/showcase/assets/Destiny_By_Design_Spring_09a.mp3">Destiny by Design</a> with this regex: var audiofile = vRows[i].firstChild.nodeValue.replace(/<a[^href]+href=\"([^\"]*)\"[^>]*>/ig,"$1"); and the result is... Destiny_By_Design_Spring_09a.mp3Destiny by Design</a> Hmm... any suggestions? (Trying to get an embedded player working; the click-to-download thing kinda stinks!) Thanks so much! --Dave Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted June 16, 2009 Share Posted June 16, 2009 Woah too complicated to comprehend. Try something simple like this - var audiofile = vRows[i].firstChild.nodeValue.match(/[^\/]+?\.mp3/); alert(audiofile); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.