I'm looking for a
s///g construct to transform lines like:
[_CELL_]This is a sentence on one line.
[_CELL_] Cell 1 [_CELL_] Cell 2 [_CELL_] Cell 3
into:
<CELL>This is a sentence on one line.</CELL>
<CELL>Cell 1</CELL><CELL>Cell 2</CELL><CELL>Cell 3</CELL>
and feeling dumb I can't think of one off the top of my head.
Bonus question: Does anyone recognize that format? All I know is it's probably produced by FrameMaker (buggily) and used by O'Reilly for book publishing. It also includes things like:
[_Body_] ... a paragraph on on line ...
... {_XRef#89948_} ...
... [_Fi_]something in italics[_F_] ... etc. I don't like this format much (at all), so I'm trying to make a tool to convert it into XML and back. And I'd love to hear: "That's FMEZ format! Joe X has a great module for converting it!"
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.