Quote:
Originally Posted by ownedbycats
I was trying to make a second regex to account for ISBNs with spaces/dashes. Did I make a mistake with the regex or the search syntax here?
https://regex101.com/r/vJUZpu/1
Code:
identifiers:"=isbn:~\d{1}(-|\s)\d{3}(-|\s)\d{5}(-|\s)\d{1}"
(I also need to figure out how to account for the X check digit)
|
replace the last term with [0-9X]
FWIW \d{1} is redundant. \d is a single DIGIT
Also: Your pattern is way to tight for small presses
0-1234567-8-X is valid (check digit is incorrect

)
1-2-3456789-0 is valid, and any 8 digit combination in between the language and check