![]() |
#1 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,750
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Search for ISBN-10s
Is there any way to do a search for isbn: identifiers that have ten digits rather than thirteen? (To make it even more confusing, some of the ISBN-10s might still have the dashes.)
![]() |
![]() |
![]() |
![]() |
#2 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,750
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
I tried this:
Code:
identifiers:"~isbn:\d{10}" |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,190
Karma: 1988646
Join Date: Aug 2015
Device: Kindle
|
Try this:
Code:
identifiers:"=isbn:~^\d{10}$" |
![]() |
![]() |
![]() |
#4 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,750
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
That works! Thank you.
I wonder why it requires the begin and end modifiers. |
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,190
Karma: 1988646
Join Date: Aug 2015
Device: Kindle
|
Because without them it will return any isbn that contains (but not limited to) 10 consecutive digits. The modifiers make sure it counts all from start to finish and matches only those limited to 10.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,750
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Wouldn't it match all my books that contain ISBNs, then? (I convert them all to 13s.) Instead, i got no matches.
|
![]() |
![]() |
![]() |
#7 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,190
Karma: 1988646
Join Date: Aug 2015
Device: Kindle
|
Without the modifiers it should match all isbns. Note that my expression is different from the one you posted, not only by including the modifiers, but also relocating the tilde.
|
![]() |
![]() |
![]() |
#8 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,750
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
When I put my original one in but moved the tilde to the location yours is in I got all my ISBN-13s.
|
![]() |
![]() |
![]() |
#9 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
It is the second tilde. That is running the regex against the values found for each ISBN identifier. Without it, the search is a character match.
The ISBN is a special identifier and you can just use: Code:
isbn:~^\d{10}$ |
![]() |
![]() |
![]() |
#10 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,925
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
ISBN 10 can end in an 'X' (mod 11 check digit)
|
![]() |
![]() |
![]() |
#11 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,780
Karma: 103895653
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
The main difference I think between 13 and 10 digit is:
Usually the 978 is first three digits of 13, I think it means Country = Books, bookland The last digit on both is a checksum. The formula is public. Obviously the 10 and 13 digit code last digit will rarely match. So it's possible to convert all 10 to 13. Sometimes both are listed for a book. A different format even of the exact same content has a different code. A revision, rather than simple reprint, even in same format has a different code. The purpose of it is so retail outlets, libraries or end users can purchase a particular edition. That's why it was changed from 10 digits to be 13 to match UPC/UAN, the retail codes on baked beans or a tape measuring tool. I'd update mine to 13 digits, if I was using them. I don't in the Library. I discovered in the 1990s doing physical library software that the library needed its own unique per item, not per title, barcode. The ISBN was only of use to add a new title to the database, after that it wouldn't be used for tracking. A real library often has multiple copies of the same title (books, audio, video, electronic files, games etc.). So though I have barcode scanning on my phone, a wireless stock terminal with barcode scanning and a PC barcode scannner, I don't use ISBN at all. I actually don't even use it to order in a bookshop because I usually care more about getting the book than the format. The staff search by title and then confirm the author because titles are not at all unique. It's very rare that more than one edition or format is available for the bookshop to order, because the publishers tend to only print the Trade edition when hardback is nearly sold out (if there is a hardback) and then later the pocketbook/Mass Market edition for supermarket discount and when the Trade size is nearly sold out. So that's why I don't have ISBN in my Calibre library. Amazon ebooks inherently are only from Amazon, hence any ISBN is likely the epub version sold everywhere else. The same ebook might have a different ISBN from each ebook retailer, or one from Smashwords or Ingram or 24bookprint. Google like Amazon has their own non-ISBN book ID, though you can use your own ISBN when publishing there. So I'm curious how much use ISBN is in Calibre. I'd print a non-UPC type barcode based on Calibre unique record or some other per item code if I was using barcode scanning with Calibre and physical items. And I do have multiple copies or versions of the same paper book. But I only have PDFs and ebooks in Calibre. |
![]() |
![]() |
![]() |
#12 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,925
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
I had a bit of discussion over at Kiwidude's ISBN PI years ago as I had done a home grown POS to sell books.
The first grouping in ISBN(10) is Language. 0 being English I use the term 'Grouping' as the only fixed part of an ISBN10 is the check digit Language-Publisher-book number-check digit BPH's have very low Publisher # and lots of book numbers. OTOH Vanity Presses may have only a single digit book number. EAN assigned 978,979 to be compatible with retail assignments (the starting digits have additional meaning and made up counterfeits in commerce streams cause all sorts of grief) |
![]() |
![]() |
![]() |
#13 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,750
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
I keep the Library Codes plugin around just for converting my 10s to 13s. It looks a little neater in the column.
![]() |
![]() |
![]() |
![]() |
#14 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,750
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
I was trying to make a second regex to account for ISBNs with spaces/dashes. Did I make a mistake with the regex or the search syntax here?
https://regex101.com/r/vJUZpu/1 Code:
identifiers:"=isbn:~\d{1}(-|\s)\d{3}(-|\s)\d{5}(-|\s)\d{1}" Last edited by ownedbycats; 02-09-2021 at 03:11 AM. |
![]() |
![]() |
![]() |
#15 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
It worked here but picked up some other. You probably need to anchor it to the start and end:
Code:
identifiers:"=isbn:~^\d{1}(-|\s)\d{3}(-|\s)\d{5}(-|\s)\d{1}$" |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
ISBN metadata search issue | Iconoclastica | Library Management | 12 | 04-26-2020 09:46 PM |
A search for books with NO ISBN in 'Ids'? | 222fbj | Library Management | 3 | 08-06-2016 11:26 AM |
Troubleshooting Kindle PW only stays connected (USB) for 10s at a time? | MyNameIsMrBurns | Amazon Kindle | 9 | 02-27-2015 01:48 AM |
ISBN Search: use Amazon instead of Worldcat? | klieber | Calibre | 9 | 02-21-2014 08:20 AM |
Search on blank ISBN | tilleydog | Calibre | 2 | 07-05-2010 09:27 PM |