#!/usr/bin/perl -w use strict; while (<DATA>) { if (m|^\s*\<Content\>| ... m|^\s*\<\/Content\>|) { s/(\^M)+/\^M/g; #compress multiple ^M to one s/(\^M)/<br\/>>/g; print $_ unless m|\<.?Content\>|; # don't print <Content> # or <\Content> lines } } =pod THE ABOVE CODE PRINTS: Some of the week's top stories:<br/>> EASTON AREA<br/>> BETHLEHEM AREA<br/>> CARBON, SCHUYLKILL AND REGION<br/>> have charged his mother's boyfriend, Paul Hoffman, with third-degree m +urder. Officials said the charges were filed after an exhaustive inve +stigation that showed Miller, who died Sept. 25, had the mental capac +ity of a 12-year-old.<br/>> =cut __DATA__ <ID>^M <Number>124^M</Number>^M <Content> Some of the week's top stories:^M EASTON AREA^M BETHLEHEM AREA^M CARBON, SCHUYLKILL AND REGION^M^M have charged his mother's boyfriend, Paul Hoffman, with third-degree m +urder. Officials said the charges were filed after an exhaustive inve +stigation that showed Miller, who died Sept. 25, had the mental capac +ity of a 12-year-old.^M </Content> ^M ^M ^M ^M ^M ^M
In reply to Re: substitution issue
by Marshall
in thread substitution issue
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |