Launching a SaaS?·Collect waitlist signups before you build — before.run
SandboxPatternsDetectDocsChangelog
Content
#isbn
#isbn-13
#book
#publishing

ISBN-13

Validates 13-digit International Standard Book Numbers (ISBN-13) with optional hyphens or spaces.

E-commerce book catalog validationLibrary catalog systemsPublisher portal uploads
/
/
Safe
Test String
3 matches
(?:…)Non-capturing groupNon-capturing group — groups without capturing (no index assigned)
99'9' — literal character
77'7' — literal character
88'8' — literal character
||| — alternation: matches expression on left OR right
99'9' — literal character
77'7' — literal character
99'9' — literal character
[…]?Character class […]Matches any single character listed in this set — repeated zero or one time (optional) · ? — zero or one time (optional)
--'-' — literal character
' ' — literal character
\d{1,5}digit\d — digit (0–9) — repeated between 1 and 5 times · {1,5} — between 1 and 5 times
[…]?Character class […]Matches any single character listed in this set — repeated zero or one time (optional) · ? — zero or one time (optional)
--'-' — literal character
' ' — literal character
\d{1,7}digit\d — digit (0–9) — repeated between 1 and 7 times · {1,7} — between 1 and 7 times
[…]?Character class […]Matches any single character listed in this set — repeated zero or one time (optional) · ? — zero or one time (optional)
--'-' — literal character
' ' — literal character
\d{1,7}digit\d — digit (0–9) — repeated between 1 and 7 times · {1,7} — between 1 and 7 times
[…]?Character class […]Matches any single character listed in this set — repeated zero or one time (optional) · ? — zero or one time (optional)
--'-' — literal character
' ' — literal character
\d{1}digit\d — digit (0–9) — repeated exactly 1 time · {1} — exactly 1 time
Pattern: 57 charsInput: 49 chars
100% client-side · private

Valid Examples

  • 978-3-16-148410-0
  • 9798650893322
  • 978 0 596 52068 7

Invalid Examples

  • 123-4-56-789012-3
  • 978-3-16-148410-01
  • 978-3-16
  • abc-d-ef-ghijkl-m

Usage & Integration

Validate ISBN-13 natively in your backend or frontend without copying regex strings.

Node / Edge

import { validate } from '@regexto/validators';

validate('isbn-13', '...');

Python

from regexto_validators import validate

validate("isbn-13", "...")

Go

import "github.com/regex-to/validators-go"

valid, err := validators.Validate("isbn-13", "...")

PHP

use RegexTo\Validators\Validator;

Validator::validate('isbn-13', '...');

Rust

use regexto_validators::validate;

let is_valid = validate("isbn-13", "...").unwrap();