Oh man. I can't believe I didn't think to check Drupal...or GitHub. Thank you both! The Ruby version is super simple, but I believe for my purposes (coverted to PHP anyway) it should suffice. The Drupal module's version also seems to go the route of simple as opposed to exact matching.
Either way, thanks again!
Saratoga Springs Public Library
49 Henry Street
Saratoga Springs, NY, 12866
 584-7860 x217
Please consider the environment before printing this message.
From: Code for Libraries [[log in to unmask]] on behalf of Parker, Anson (adp6j) [[log in to unmask]]
Sent: Friday, October 21, 2011 1:52 PM
To: [log in to unmask]
Subject: Re: [CODE4LIB] ISBN Regular Expression
Nice one Sean, here's the drupal version http://drupal.org/project/isbn
also contains code to distinguish country codes....
On 10/21/11 1:48 PM, "Sean Hannan" <[log in to unmask]> wrote:
>GitHub search knows all:
>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
>> until now. I suppose that's a testiment to all of the software out
>> However, I now find that I need to validate both the 10-digit and
>> ISBNs. I realize there's also a check digit and a REGEX cannot check
>> 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
>> organization's website didn't seem to be overly clear to me.
>> 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
>> hyphenation or spaces between numbers since some of this data will be
>> 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
>>  584-7860 x217
>> Please consider the environment before printing this message.
>> To report this message as spam, offensive, or if you feel you have
>> this in error,
>> please send e-mail to [log in to unmask] including the entire contents and
>> of the message.
>> It will be reviewed by staff and acted upon appropriately.
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.