Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2005-04-10 04:40:13


> we need to validate ISBN.
> With another REGEX-implementation we uses (?=.{13})\d{1,5}(
> |\-)\d{1,7}\1\d{1,6}\1(\d|X).
> But this seem not to work.
> Only the shorter version "\d{1,5}( |\\-)?\\d{1,7}\\1\\d{1,6}\\1(\d|X)"
> works, but how to check the 13 digits?

It certainly should work, but can you:

1) Check that if you are embedding the regex in the program as a string,
that you have "double escaped" any escape characters that should be seen by
the regex engine (remember that the C++ compiler swallows the first one).

2) Can you provide a short test case of something you think you should work
but doesn't.

Thanks,

John.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk