M
MCH
hi there,
I am working with a HTML-like text with boost:regex. For example,
the following pattern might occur in my text
<abc efg>
[TAG] <p>EFG</p> [/TAG] 12<3>
In this case, I would like to extract everything between [TAG] [/TAG]
and replace [TAG] with <pre>, [/TAG] with </pre>. Meanwhile,
everything outside [TAG][/TAG] should be unchaged except that < is
replaced by < and > is replaced by >
In far more complicated case, a nested [TAG] might occur as follow
<abc efg>
[TAG] <p>EF [TAG] eee [/TAG] G</p> [/TAG] 12<3>
in this case, the program just tackle the outermost TAG and left the
inside TAG there. I try to implement the program with boost::regex;
however, it seems never succeed in extracing the TAG even for the
simple case.
I am working with a HTML-like text with boost:regex. For example,
the following pattern might occur in my text
<abc efg>
[TAG] <p>EFG</p> [/TAG] 12<3>
In this case, I would like to extract everything between [TAG] [/TAG]
and replace [TAG] with <pre>, [/TAG] with </pre>. Meanwhile,
everything outside [TAG][/TAG] should be unchaged except that < is
replaced by < and > is replaced by >
In far more complicated case, a nested [TAG] might occur as follow
<abc efg>
[TAG] <p>EF [TAG] eee [/TAG] G</p> [/TAG] 12<3>
in this case, the program just tackle the outermost TAG and left the
inside TAG there. I try to implement the program with boost::regex;
however, it seems never succeed in extracing the TAG even for the
simple case.