Opened 8 years ago

Closed 8 years ago

#10114 closed Bugs (fixed)

Incorrect position of partial match when using u32regexes

Reported by: mkrasowski@… Owned by: John Maddock
Milestone: To Be Determined Component: regex
Version: Boost 1.55.0 Severity: Problem
Keywords: regex icu Cc: mkrasowski@…

Description

Hi,

I got a problem with results of partial matches when using ICU Unicode strings and u32regex_iterator. The regular expression is created with default flags and search is done using match_perl | match_partial. Tested on 64bit Linux, boost compiled against ICU 53 with gcc 4.9.

When searched for regular experession: "summary" in string "in summary in math we are using sum", and for regular expressions based on std::string got the following results:

match length: 7 match position: 3 matched: summary match length: 0 match position: 32 matched: sum

when doing search using icu::UnicodeString and u32regex_iterator got the following result:

match length: 7 match position: 3 matched: summary match length: 0 match position: 35 matched:

So in both cases the partial match is found but in the latter the returned position is incorrect.

I attached a simple application I used for testing.

Regards, marcin

Attachments (1)

regex_iter.cc (1.6 KB ) - added by mkrasowski@… 8 years ago.
simple program used for testing

Download all attachments as: .zip

Change History (2)

by mkrasowski@…, 8 years ago

Attachment: regex_iter.cc added

simple program used for testing

comment:1 by John Maddock, 8 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.