Boost logo

Boost Users :

Subject: [Boost-users] [C++] Boost::Regex beginner question
From: P.C. (cavalo451_at_[hidden])
Date: 2008-12-18 17:41:31


salutations,

I'm a complete beginner in Regex++; I've downloaded it and installed it in
Visual C++ 6.0, and it's functioning properly.
the problem is that I searched all over the internet and I only discovered
how to do basic matching operations and basic replacing.
my doubt is the following: I want to know how to do search and replace
regexp operations, like it can be done in Perl by using groups (expressions
surrounded by parentheses), which allow to select the substrings, matched by
the regexp, in the form of $1, $2, and so on. basically, the parentheses
mark the matched expression for future reference (for example, for use in
the replace operation).
for example (Perl example):
s/X(.*?)Y/XY$1/g;
I'm not sure if this explanation of what I want is very clear.
I would appreciate a straightforward example code.

thank you in advance.

-- 
View this message in context: http://www.nabble.com/-C%2B%2B--Boost%3A%3ARegex-beginner-question-tp21081743p21081743.html
Sent from the Boost - Users mailing list archive at Nabble.com.

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