RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find ISBN 10 or 13
Expression
^(97(8|9))?\d{9}(\d|X)$
Description
Validates both ISBN 10 and ISBN 13 numbers, and confirms ISBN 13 numbers start with only 978 or 979.
Matches
0672317249 | 9780672317248
Non-Matches
0-672-31724-9 | 5555555555555
Author Rating: The rating for this expression. Michael Fienen
Source
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: does not validate checkdigit
Name: 0c
Date: 11/27/2023 1:52:50 PM
Comment:
title.


Title: does not validate checkdigit
Name: 0c
Date: 11/27/2023 1:52:46 PM
Comment:
title.


Title: overstating the case
Name: Anonymous Coward
Date: 3/2/2011 3:58:42 PM
Comment:
Saying this RE validates the ISBN overstates the case. "Validation" refers to making sure the check digit is correct. All this does is make sure there are 13 digits, and if 13, it starts with 978 or 979.


Title: overstating the case
Name: Anonymous Coward
Date: 3/2/2011 3:58:25 PM
Comment:
Saying this RE validates the ISBN overstates the case. "Validation" refers to making sure the check digit is correct. All this does is make sure there are 13 digits, and if 13, it starts with 978 or 979.


Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials