[Dev-C++] Regular expressions: string substitution with pcre or any other library?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Bernd M. <Ber...@eu...> - 2006-02-15 11:13:27
|
Hi together, most of the time I'm using .net framework to programm C++. F.E. I can do the following: Regex* rex; String*=20 replacedTags=3Drex->Replace(originalLine,S"<(.*)?>,S"<SPECIAL>$1</SPECIAL= >"); For a special program I would like to do the same in a standard C++ progr= am. I found the library pcre and after some starting problems I'm able to=20 compile and link to it. But with this library I can only test if a string matches to a pattern=20 and extract the corresponding substring. I think I would be able to write a function for replacing this=20 substring, but there must have someone before me who did this work=20 already ;-) Searching with google "pcre string replace substitute" or whatever I did=20 not find any solution for pcre nor any other library for the same thing=20 (it must be a library which can be used with Windows XP). Thank you for any hints, Bernd --=20 Bernd M=FCnt Durchwahl: 030/69032-509 euroscript Deutschland GmbH Zentrale: 030/69032-300 Abteilung IT-Management Fax: 030/69032-505 Alt-Moabit 91 Mail: Ber...@eu... 10559 Berlin Web: http://www.euroscript.de |