Artist Sort problem

I'm using the following expression to set the artistsort field ^(.+)\s(.+)$ with the field being set to $2, $1.

This doesn't work for say Bob Marley & the Wailers - it generates Wailers, Bob Marley & The. It looks like I need to start from the front of the field.

Suggestions please.

Tim

RE: ^(.+?)\s(.+?)\b
rw: $2, $1

Thanks, I've started going through the information at http://www.regular-expressions.info/, but the learning curve is pretty steep. I tried a few changes, but they would fail on either type. I actually am trying to decifer your expression in plain english but can't get how the question marks work in this case.

Are there any other references I should follow? I'm starting to realise that if I get a handle on regex I'll be able to do much more clever things with MP3tag. I also use PSPad (initially because Slim Devices squeezecentre uses unix format files, but since then because it is a great text editor), and I can envisage using Regex with that from time to time.

Thanks again for your help.

Tim

http://www.regular-expressions.info/repeat.html :book: :slight_smile:

I've read how all of the operators are meant to work, but I just can't follow the matching process through in my head or using pen and paper - I should be able to get this, but for some reason my brain is stuck in neutral!

Tim