From: Andrey Tcherepanov (moyt63c02_at_[hidden])
Date: 2008-03-15 00:55:49
I think both of your code posts would be greate addition if not to the
library itself, then to the examples section of it for sure.
On Fri, 14 Mar 2008 20:15:35 -0600, Eric Niebler
> Robert Dailey wrote:
>> Hey Eric,
>> I ended up using the method you proposed anyway mainly because I love
>> so much and also because you did all of the work for me, so I couldn't
>> that go to waste.
> Great! You might want to also provide the following overload with a
> simpler interface. It traffics in strings rather than iterators, and
> just invokes the more general iterator-based algorithm that I sent
> template<typename Char, typename Format>
> inline std::basic_string<Char> regex_grep(
> std::basic_string<Char> const &str
> , xpressive::basic_regex<
> typename std::basic_string<Char>::const_iterator
> > const &re
> , Format format
> , xpressive::regex_constants::match_flag_type flags
> = xpressive::regex_constants::match_default
> std::basic_string<Char> result;
> , str.begin()
> , str.end()
> , re
> , format
> , flags
> return result;
> Now you can simply say "out = regex_grep(in, rex, formater())". As with
> much template code, it looks more daunting at first than it really is.
>> In any case, I split up your source a little and placed them into more
>> generic hpp files and I've put that into the engine for our game. You
>> very helpful, and I thank you. I'll submit a patch later on when I have
>> to mess with it. For future reference, where can I submit patches?
> You can submit patches at the same place you file bugs and make feature
> requests: svn.boost.org. Use the "New Ticket" button and follow the
> instructions. If you go this route, I'm much more likely to accept the
> patch if it comes with tests and documentation.
> I'll also say that the name "regex_grep" is lousy. I was thinking that
> Boost.Regex had this functionality with that name, but I was mistaken.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk