Opened 10 years ago

Closed 10 years ago

#8159 closed Bugs (fixed)

Boost Regex Documentation Problem: Some examples are wrong

Reported by: Marcelo Garlet Millani <marcelogmillani@…> Owned by: John Maddock
Milestone: To Be Determined Component: regex
Version: Boost 1.53.0 Severity: Problem
Keywords: regex documentation negation Cc:

Description

In the description of the Perl syntax for regex ( http://www.boost.org/doc/libs/1_53_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html ), in the Negation paragraph, it is written: " If the bracket-expression begins with the character, then it matches the complement of the characters it contains, for example =a-c= matches any character that is not in the range a-c. "

However, the regex =a-c= actually matches the string =a-c=, contrary to what the example says. It should be [^a-c] instead of =a-c=.

Also, in both paragraphs above ("character ranges" and "single characters") regexes like =[abc]= and =[a-c]= are used in place of [abc] and [a-c], respectively.

Attachments (1)

main.cpp (841 bytes ) - added by Marcelo Garlet Millani <marcelogmillani@…> 10 years ago.

Download all attachments as: .zip

Change History (4)

by Marcelo Garlet Millani <marcelogmillani@…>, 10 years ago

Attachment: main.cpp added

comment:1 by viboes, 10 years ago

Component: Noneregex
Owner: set to John Maddock

comment:2 by John Maddock, 10 years ago

It's a SNAFU in the document formatting, will fix shortly.

comment:3 by John Maddock, 10 years ago

Resolution: fixed
Status: newclosed

(In [83987]) Fix formatting of document. Fixes #8159.

Note: See TracTickets for help on using tickets.