in reply to Validating ISBN numbers?

Hi gant,

I think the following should do it.
/ISBN \d+[ -]+\d+[ -]+\d+[ -]\d/;

Hope this helps

thinker
update I have realised that this is not a regex type question. I realise now that ISBN has it's own validating rules. Sorry. :-)

Replies are listed 'Best First'.
Re^2: CGI -Perl problem
by Aristotle (Chancellor) on Dec 17, 2002 at 17:51 UTC
    That will match a valid ISBN along with many invalid ones. For a start, you're using + where you should be using things like {4} or {4,5}.

    Makeshifts last the longest.