Your regex is perfect, but you'll need to ungroup a couple of items in the regular expression in order for it backreference properly. Otherwise it will take a URL like this:
http://rayj.imeem.com/music/Z_soii_o/ray_j_all_i_feel/
and
$p1 will try to put
Z_soii_o/ray_j_all_i_feel instead of referencing the embed code where the video ID number is:
http://media.imeem.com/m/7tGKCr7sUP/
The first regular expression should look like this so it skips over it properly.
Code:
http://[\w]*\.imeem\.com/music/[\w-_]+/[\w-_]+/
Otherwise, it's perfect. I'll add it to the next update.
EDIT: Looks like a few of the URLs have a dash in the first
[\w]+ area. So I added a dash (-) and a underscore (_) just in case.