Regular expressions: string substitution with pcre or any other library?

B

Bernd Muent

Hi together,
most of the time I'm using .net framework to programm C++.
F.E. I can do the following:

Regex* rex;
String*
replacedTags=rex->Replace(originalLine,S"<(.*)?>,S"<SPECIAL>$1</SPECIAL>");

For a special program I would like to do the same in a standard C++ program.
I found the library pcre and after some starting problems I'm able to
compile and link to it.
But with this library I can only test if a string matches to a pattern
and extract the corresponding substring.
I think I would be able to write a function for replacing this
substring, but there must have someone before me who did this work
already ;-)

Searching with google "pcre string replace substitute" or whatever I did
not find any solution for pcre nor any other library for the same thing
(it must be a library which can be used with Windows XP).

Thank you for any hints, Bernd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top