helpful in sorting out the mess Lightroom makes in exporting keywords.
Perhaps I'm missing something here and maybe that's why I think I have a problem!
I don't think Lightroom is making a mess, Photo Mechanic is. PM is reading the keywords from two locations where one would suffice. Graham, what happens once you've successfully deleted the duplicate keywords and you revisit the image? If PM or Photo Mechanic Plus re-reads the file you're going to be back to square one with duplicate keywords again.
GREP is very clever, but I'm sure there's an easier way available to general users to deal with this by preventing PM from reading both sets of XMP keywords.