Title |
Test
Find
ISBN Checker
|
Expression |
^[ISBN]{4}[ ]{0,1}[0-9]{1}[-]{1}[0-9]{3}[-]{1}[0-9]{5}[-]{1}[0-9]{0,1}$ |
Description |
Expression to check for a valid ISBN number |
Matches |
ISBN 0-596-00681-0 |
Non-Matches |
Anything that's not in the above format |
Author |
Rating:
Alex Richards
|
Source |
ISBN website |
Your Rating |
|
Title: Not strict
Name: Michael Ash
Date: 2/19/2007 11:24:53 AM
Comment:
Aside from not checking the length if the segments or all the check digits you are misusing the character class.
You pattern will match "BINS 0-000-00000-0" or "BIBS 0-000-00000-0" or "SINS 0-000-00000-0"
see http://regexlib.com/REDetails.aspx?regexp_id=463 for a stricter pattern