Clean up Part notations in iTunes titles


/ Published in: Bash
Save to your folder(s)

I pipe in a title, like say \"Best of Both Worlds, Part 2\" though this, it works fine, but if I omit the space between \"Part\" and the number, I get unexpected behavior:\r\n\r\n- If it\'s a single digit, like \"part2\", it works fine, giving me \" (2)\"\r\n- If it\'s more than one digit, it chops off the first digit, so \"part123\" becomes \" (23)\"\r\n\r\n[Sigh. Snipplr is adding the backslashes here, not me. Please ignore them.]


Copy this code and paste it in your HTML
  1. sed -e 's/ *-\{0,1\},\{0,1\} *[Pp][Aa]\{0,1\}[Rr]\{0,1\}[Tt].\{0,1\} *\([0-9]\{1,\}\) *$/ (\1)/'

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.