Topic: $rsearch

Hi!

Could someone explain what this code snippet gives back? Thanks!

$rsearch(\(%album%\),\(\\\([\.]*\\\)\$\))

I took it from here: http://musicbrainz.1054305.n4.nabble.co … 88092.html

Tubebend

Re: $rsearch

This is a great proposal for classical music, but the only issue is when multiple artists exist. For all types of music, even classical music, Picard should use the first value when multiple artists / composers exist, if you like using iTunes. If Picard named the artist "XYZ/ABC", then iTunes won't detect that XYZ and ABC are different artists, but will assume that there is one artist named "XYZ/ABC" If you're using MediaMonkey or WMP, those programs can detect that XYZ and ABC are different artists, instead of assuming that there is one artist named "XYZ/ABC". When using Peer-2-Peer (P2P) software program, BearShare, the first value would be read even when multiple artists / composers exist.

3 (edited by tubebend 2012-09-08 20:12:43)

Re: $rsearch

Chuckmoore,

thanks a lot for explanation. Perhaps I should have been clearer in my question.

It's a shame, but I'm not common with regular expressions. Also not with python. In detail I'm looking for a solution to get the first part of a string before ":" or "," occurs. For example I want to extract the string "Caution" from "Caution, it's a regex!".  So when I asked someone to explain the code above I hoped to get more clear about regular expression - and perhaps to use this knowledge to solve my original issue.

I know that there are several ressources in the web about regex's. But to learn the howto is actually a little "out of topic"...

In my other post you already recommended to use Audio-Expert to organize my library. But I feel that I'm just a little before to organize everything via Picard - via this superior open source and free to use software... :-)

Bye, Tubebend

Re: $rsearch

Hi,

finally I think I got it by myself - hopefully: If album-tag contains string "Explosive Doowops, Volume 4" then

$rsearch(%album%,[^\,:]+)

returns the leading "Explosive Doowops" and

$rsearch(%album%,[^\,:]+\$)

returns the trailing "Volume 4" - kindly whithout the leading whitespace in file naming preview...

Tubebend

Re: $rsearch

If you have not seen this post, it may also help you.

http://forums.musicbrainz.org/viewtopic.php?id=514

Re: $rsearch

Demono,

I saw it - great binding of different solutions in file naming and tagger scripts. But unfortunately they do not really use many regular expressions over there.

But you're right: After a period of testing I should post my personal solution in the repository. Others might want to participate.

Cheers, Tubebend