
10 Apr
2005
10 Apr
'05
10:02 a.m.
Detlef wrote:
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?
Have you tried \2 instead of \1 for the long expression? AFAICS from the documentation <http://www.boost.org/libs/regex/doc/syntax.html>, the first "Forward Lookahead Assert" is still a match, but you want to refer to the second parenthesis, right? Regards, Daniel