Validationflags: g

ISBN-10

Match 10-digit ISBNs, allowing optional hyphens or spaces between groups.

Try it in RegexPro

Pattern

regexJavaScript
/\b(?:\d[\- ]?){9}[\dXx]\b/g

Raw source: \b(?:\d[\- ]?){9}[\dXx]\b

How it works

Nine digits each followed by an optional hyphen or space, then a final check character which can be a digit or X (upper or lower case).

Examples

Input

0-306-40615-2

Matches

  • 0-306-40615-2

Input

0306406152

Matches

  • 0306406152

Input

080442957X

Matches

  • 080442957X

Common use cases

  • Book catalog imports
  • Library management systems
  • E-commerce product identifiers
  • Bibliographic data cleaning