|
Boost : |
From: Keith MacDonald (boost_at_[hidden])
Date: 2005-05-31 06:30:44
Instead of regex_replace, you could use regex_search, then std::copy for
literal replacement, or match_results::format otherwise.
Keith MacDonald
"Lorenzo Bettini" <bettini_at_[hidden]> wrote in message
news:d7hepp$403$1_at_sea.gmane.org...
> Hi
>
> when I use
>
> template <class traits, class Allocator, class charT>
> basic_string<charT> regex_replace(const basic_string<charT>& s,
> const basic_regex<charT, traits, Allocator>& e,
> const basic_string<charT>& fmt,
> match_flag_type flags = match_default);
>
> is there a way to make the fmt string be substituted as IT is?
>
> I mean if I specify "(\\)", for instance, I want that actually those four
> characters to be substituted for the occurrences of e in s, without any
> interpretation of ( and \.
>
> Of cource I could escape both ( and \, but I was wondering if there's an
> option to avoid this.
>
> thanks in advance
> Lorenzo
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk