Function Repository Resource:

ValidISBNQ

Source Notebook

Check if a string is a valid ISBN-13 or ISBN-10

Contributed by: Jan Mangaldan

ResourceFunction["ValidISBNQ"]["string"]

checks if "string" corresponds to a valid 13-digit International Standard Book Number (ISBN-13).

ResourceFunction["ValidISBNQ"]["string",10]

checks if "string" corresponds to a valid 10-digit International Standard Book Number (ISBN-10).

ResourceFunction["ValidISBNQ"][eid]

checks if the ExternalIdentifier eid corresponds to a valid ISBN.

Details

The International Standard Book Number (ISBN) is a numeric commercial book identifier that is intended to be unique to each separate edition and variation (except reprintings) of a publication.

Examples

Basic Examples (2) 

Check the ISBN-13 of the book An Elementary Introduction to the Wolfram Language:

In[1]:=
ResourceFunction["ValidISBNQ"]["978-1944183059"]
Out[1]=

Check the ISBN-10 of the same book:

In[2]:=
ResourceFunction["ValidISBNQ"]["1-94418-305-1", 10]
Out[2]=

Scope (3) 

The ISBN may or may not have dashes:

In[3]:=
ResourceFunction["ValidISBNQ"]["080442957X", 10]
Out[3]=
In[4]:=
ResourceFunction["ValidISBNQ"]["0-8044-2957-X", 10]
Out[4]=

ValidISBNQ supports ExternalIdentifier objects:

In[5]:=
ResourceFunction["ValidISBNQ"][
 ExternalIdentifier["ISBN10", "1-57955-008-8"]]
Out[5]=
In[6]:=
ResourceFunction["ValidISBNQ"][
 ExternalIdentifier["ISBN13", "978-1579550370"]]
Out[6]=

ValidISBNQ returns False for everything else:

In[7]:=
ResourceFunction["ValidISBNQ"]["xxx"]
Out[7]=
In[8]:=
ResourceFunction["ValidISBNQ"][Pi]
Out[8]=

Version History

  • 1.1.0 – 12 July 2021
  • 1.0.0 – 14 October 2019

License Information