Wrong, there are typically quotation marks around attributes, then the link anchor tag is followed by text which can be "MP3", you would then match too much.
The URL can use various extensions (including with variable letter case). Also note that the dot pattern does matches spaces. And the .mp3 links can also use non-ASCII characters (not necessarily URL-encoded, and you cannot safely guess which text encoding is used in the path or querystring of the URL, as it is not necessarily the same as the HTML page encoding itself (including when it is URL-encoded to become ASCII). URLs re designed to be opaque for most things, except that HTTP(S) are designed to be "hierarchic" and make special behavior only of the "/" and or .." relative references; "." alone is supported by target filesystems onwhic h the webserver is installed, but not needed for HTTP(S) which defines its own filesystem space with web semantics, not local-OS semantics on the server. Beside that the path elements in HTTP are opaque binary, do not support any control or whitespaces that have not been URLencoded in %xx hexadecimal form, and do not have any semantics which is brought separately in MIME type headers.
Once again you need to stcik to the URI RFC. Don't reinvent the wheel, there are already tons of URL parsers. And many MP3 on the web are never accessible with an URL ending with ".mp3" in their path or in their query string, and the terminatione ".mp3" may has well return actually NO valid MP3 but plain HTML, or plain text or other file formats (as indicated properly by the MIME type header and the HTTP status code).
Then look and HTML refefences to see how these URLS are further reencoded by another layer in HTML, applying additional escaping when needed (like character references "&name;" or "&#numericDecimal;" or "&#xnumericHexadecimal;" using Unicode code points independantly of the encoding in the URI itself. Three distinct encoding layers are applied to encapulate the actual resource names, two of them being standard, but one of them being resolved only in the server side.