bartelby has asked for the wisdom of the Perl Monks concerning the following question:
am a beginner so what I need is way out of my league at the moment.
Have a text file with html markup in format
<p>text text text</p>
and basically I need to wrap these sequentially with xliff tags so I get:
<bpt i="1" x="1"><p></bpt>text text text<ept i="1"></p></ept>so the bpt as opening and the ept as closing with the next found paired occurrence having counter "2" (<bpt i="2" x="2">) and so on,
can someone please help?
thanks in advance, bart
know it looks strange but it is in fact the syntax that I need
thanks for all the input so far
xyzzy - I tried running the code but got errors (about spaces and barewords)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Adding counters for text replacement
by AnomalousMonk (Archbishop) on Jul 08, 2012 at 21:24 UTC | |
|
Re: Adding counters for text replacement
by xyzzy (Pilgrim) on Jul 08, 2012 at 21:13 UTC | |
|
Re: Adding counters for text replacement
by Anonymous Monk on Jul 08, 2012 at 20:56 UTC | |
|
Re: Adding counters for text replacement
by aitap (Curate) on Jul 09, 2012 at 08:12 UTC |