Print

Print


GitHub search knows all:
https://github.com/zapnap/isbn_validation/blob/master/lib/isbn_validation.rb

-Sean


On 10/21/11 1:44 PM, "Kozlowski,Brendon" <[log in to unmask]> wrote:

> Hi all.
> 
> 
> 
> I'm somewhat surprised that I've never had to validate an ISBN manually up
> until now. I suppose that's a testiment to all of the software out there.
> 
> 
> 
> However, I now find that I need to validate both the 10-digit and 13-digit
> ISBNs. I realize there's also a check digit and a REGEX cannot check this
> value - one step at a time. Right now I just want to work on the REGEX.
> 
> 
> 
> Does anyone know the exact specifications of both forms of an ISBN? The ISBN
> organization's website didn't seem to be overly clear to me. Alternatively, if
> anyone has a full working regular expression for this purpose I would
> definitely not mind if they'd be willing to share.
> 
> 
> 
> The only thing I'm doing which is abnormal is that I am not requiring the
> hyphenation or spaces between numbers since some of this data will be coming
> from a system, and some will be coming from human input.
> 
> 
> 
> 
> Brendon Kozlowski
> Web Administrator
> Saratoga Springs Public Library
> 49 Henry Street
> Saratoga Springs, NY, 12866
> [518] 584-7860 x217
> 
> Please consider the environment before printing this message.
> 
> To report this message as spam, offensive, or if you feel you have received
> this in error,
> 
> please send e-mail to [log in to unmask] including the entire contents and subject
> of the message.
> 
> It will be reviewed by staff and acted upon appropriately.