Boost logo

Boost :

Subject: Re: [boost] [regex] Matching space - help needed
From: Roman Yakovenko (roman.yakovenko_at_[hidden])
Date: 2008-11-27 08:11:09


On Thu, Nov 27, 2008 at 12:15 PM, John Maddock <john_at_[hidden]> wrote:
> Roman Yakovenko wrote:
>>>>
>>>> Roman, can you try with an up-to-date Boost version, I have some dim
>>>> recollection of fixing an issue similar to this.
>>>
>>> This is the last entry in my possible solutions list :-). I also
>>> searched trac, for a bug similar to my, I didn't find any.
>>>
>>> Today, i know a little bit more about the bug:
>>> * it happens in "match" algorithm only, "search" algorithm works as
>>> expected
>>> * wregex, and regex ".getloc().name()" expression returns same data.
>>> * I also found out, that the functionality works fine with boost
>>> 1.32. However, the product I am working on, has been changed a lot
>>> too.
>>>
>>> My possible solutions list:
>>> * use search algorithm and check whether the found string is the
>>> whole string
>>> * use regex with ICU. We have ICU 3.4.
>>> * upgrade boost.
>>>
>>> What do you think?
>
> I would try with the latest Boost code *first*: just to see if it looks to
> fix the issue, it's a quick test and if it does fix things then you know
> where the problem was!

I changed the order of include headers, "boost/regex.hpp" is now the
first header included, and the problem disappear. I think, there
problem was caused by GCC 3.3.3, however I could be wrong.

By the way, I tested the locale instance, used by wregex and regex
classes, and I got the correct behavior.

Thank you for help.

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk