I just found out that the mp3-links are in the <enclosure> tag of an rss (2.0) feed. So that simplifies my script.
I changed the script, it now scans for the enclosure tag which type =”audio/mpeg” and just copy the mp3 in the url-attribute, so i don’t have to do any fancy string-manipulation stuff.