View Single Post
Old 03-05-2013, 09:57 AM   #5
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,471
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by capnm View Post
That's slick, thanks!

So to keep just isbn & goodreads, is this correct?

Search field: {template}
Template: {isbn:|isbn:|, }{identifiers:select(goodreads)|goodreads:|}
Search for: empty
Replace with: empty
Destination field: identifiers
Identifier type:*
Mode: Replace field
Split Result: Unchecked
Yes, except you should leave Split Result checked so that each comma-separated item is treated as a separate identifier. If you uncheck the box then SR tries to treat the string as 1 identifier and will complain that it finds too many colons.
Quote:
Do I care about this possibly creating an extraneous trailing comma?
No, as long as there aren't any non-blank characters following it. Null items are ignored, which means that ",,,,,,,,isbn:12345,,,,,goodreads:81267,,,,,," is also OK.
chaley is offline   Reply With Quote