Re: ISBN Regular Expression

From: Tom Pasley <tom.pasley_at_nyob>
Date: Tue, 25 Oct 2011 09:43:04 +1300
To: CODE4LIB_at_LISTSERV.ND.EDU
If you're looking for PHP code, then I've done some work for a long-dormant
project:

http://code.google.com/p/txtckr/source/browse/trunk/mvc/components/identifiers

HTH,

Tom

On Sat, Oct 22, 2011 at 6:44 AM, Kozlowski,Brendon <bkozlowski_at_sals.edu>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 abuse_at_sals.edu including the entire contents and
> subject of the message.
> It will be reviewed by staff and acted upon appropriately.
>
Received on Mon Oct 24 2011 - 16:44:01 EDT