isbn10MaybeReg top-level property

RegExp isbn10MaybeReg
getter/setter pair

RegExp instance for validating ISBN-10 format.

This regular expression validates if a string conforms to the ISBN-10 format without validating the checksum.

Pattern breakdown:

  • ^ - Asserts the start of the string
  • (?:...) - Non-capturing group
    • [0-9]{9}X - Matches exactly 9 digits followed by the character 'X'
    • | - OR operator
    • [0-9]{10} - Matches exactly 10 digits
  • ` - Asserts the end of the string

See isbn10MaybeRegStr for examples and limitations.

Implementation

RegExp isbn10MaybeReg = RegExp(isbn10MaybeRegStr);