Boost logo

Boost Users :

From: Winson Yung (winson.yung_at_[hidden])
Date: 2006-07-24 20:10:48


Thanks John, I am using 1.28.0 version of regex library.
Is the regex_iterator and regex_token_iterator available in 1.28.0? Are they
better in turn of performance?
What's the reason Regex::Grep() and alike get deprecated?

/Winson

On 7/22/06, John Maddock <john_at_[hidden]> wrote:
>
> Winson Yung wrote:
> >> Sure, here is the zip file contain the test code compiled under
> >> Visual C++ 6 as a console application. The code is bit of rough, but
> >> it behave the same way as my app. I have included a raw.txt file. In
> >> the file, the pattern is suppose to match line 2760, but instead it
> >> seems to me it's matching line 4907.
>
> OK I see the problem: when you sub-script the RegEx object you get the
> n'th
> sub-expression of the *last match found* in the last operation. If you
> dump
> the results in the vector you will see that a large number of matches were
> indeed found. You could pass a vector<std::sting> to Grep to get the
> actual
> strings that matched, or if you need more information then you'll have to
> use a callback function.
>
> Finally note that this is a legacy interface that is deprecated. There
> are
> now better alternatives, for example regex_iterator or
> regex_token_iterator.
>
> John.
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net