Opened 4 years ago

Closed 3 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@…



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) (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: added

simple program used for testing

comment:1 Changed 3 years ago by John Maddock

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
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.