0

I need a regex pattern for finding mp3 links in HTML.

I tried (<a href=")(\w*.mp3)(">), but I couldn't fetch "> from that.

My strings are:

<a href="XXXXXX.mp3"></a>
<a href="1111111.mp3"></a>
<a href="123XXX.mp3"></a>
<a href="XXXX123.mp3"></a>
user112563
  • 15
  • 1

2 Answers2

-1
(<a href=")([^"']+\.mp3)(">)

So after some random searching, this seems to work.

user112563
  • 15
  • 1
-1

try this:

FIND: <a[^>]+href="([^"]+\.mp3)"[^>]*>

Just Me
  • 864
  • 2
  • 18
  • 28