Modify

Opened 4 years ago

Closed 4 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@… 4 years ago.
simple program used for testing

Download all attachments as: .zip

Change History (2)

Changed 4 years ago by mkrasowski@…

Attachment: regex_iter.cc added

simple program used for testing

comment:1 Changed 4 years ago by John Maddock

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain John Maddock.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.