Judging by the way the requirements have evolved and by OP's Re^2: Oracle report converter reply in his other relate thread, so far we have only seen the very tip of the iceberg - there is a lot more to come. Palming the OP off with a bunch of regexen solves a short term problem in a "look what I can do" fashion, but doesn't seem to be helping the OP very much at present and will lead to a maintenance nightmare for him in the longer term.

It is hard to know what the OP's motivation for this task is, but leading him along by offering tempting morsels that will either frustrate the OP because they don't provide all of the solution, or transfer a large development project over to PerlMonks, is unlikely to get the OP to a satisfactory endpoint. In fact, that's just sadistic. Much better to be up front and say "That's a big job. Here's the tool for it." and let the OP figure out sooner rather than later that either he's not up to it, or that some serious learning needs to be done. The nice thing is that this is a pretty good place to do a lot of that learning, or at least to get a lot of guidance toward appropriate learning resources.


DWIM is Perl's answer to Gödel

In reply to Re^5: Converting Oracle report language code into perl by GrandFather
in thread Converting Oracle report language code into perl by denzil_cactus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.