beaTunes News

Friday, July 18, 2014

Featuring: Fancy Find and Replace

beaTunes2 logo Most beaTunes users love its inspection feature. It's probably the best way to manage a large library, cleaning metadata, keeping it all consistent. But for some things inspections aren't specific enough—especially because they cannot be configured (by design). A good example is: "featuring". How do you write it in your library? "feat.", "ft.", "featuring"?

To tackle this kind of problem, beaTunes 4 (to be released soon! released) has Find and Replace functionality built-in. It treats the visible text fields in the current playlist like one big document and allows you to search it. Naturally you can also replace stuff. But how does this help with the "featuring" problem?

Glad you ask! Obviously you can run multiple searches. But using regular expressions, you can also use just one. It gets a little tricky, but bear with me for a second. In regular expressions a vertical line | means or. So to search for "feat", "ft", or "featuring" you could write "feat|ft|featuring". But this will also find all instances where "ft" is just part of a word as in "left". So we need to add spaces like this " feat | ft | featuring ". That's better. But now we are missing all the cases where there is a dot after the word. So we need to add something to the expression that says: Oh, and perhaps there is a dot, too. In regular expressions this is done with a question mark. Now before we simply add a dot and a question mark, I have to mention one thing: just like vertical lines and question marks, dots have a special meaning. They act pretty much like a joker, meaning any character. That's certainly not what we want, which is why we have to escape the dot character; meaning, tell the program to use the dot literally. This is done with a backslash. In the end our regular expression looks like this: " ft\.? | feat\.? | featuring "

VoilĂ !

beaTunes highlights all visible matches, and when searching with regular expressions even displays an overlay with the potential replacement. This is especially handy when working with capturing groups.

If you'd like to try this out an Early Access release, please go to the Early Access Page download page and download the latest version. And if you do so, please provide feedback.

Thanks!

Labels: ,

0 Comments:

Post a Comment

<< Home