I was given a job to manipulate MIF files and decided to do the job in PERL for it's powerful text manipulating capabilites. A MIF file is another method to represent a FrameMaker file which contains all these tags similar to html.

What I need to do (and this is where I need help) is to delete any strike-through text in the file. Looking at the MIF file at hand, I noticed what tags I have to remove.

For example, here are the MIF tags that represents something that is strike-through.

<ParaLine <Font <FTag `'> <FStrike Yes> <FChangeBar Yes> <FLocked No> > # end of Font <String `There are at least two indications that the MM can re'>

If you look at the MIF file in FrameMaker, there will be this string strike through:

"There are at least two indications that the MM can re"

If I delete the strike-throught text by hand in FrameMaker, the MIF representation would be

<ParaLine <Font <FTag `'> <FChangeBar Yes> <FLocked No> > # end of Font

Note that the above to MIF codes are the same part of the file where text appeared when strike-through and after when it was deleted.

Okay my problem is how do I code the steps to delete any strike-through text. I've a good understand of condtions, functions, regular expressions and such.

What I need to do is if the conditon CODE1 expample is found to delete all the tags that I did in CODE2. So is it legal to declare a varibales such as

my($font) =<<EOFONT; <Paraline <Font <FTag `'> <FStrik Yes> <FChangeBar Yes> <FLocked No> > # end of Font <String 'There are at least two indications that the MM can re'> EOFONT

And I'm stuck after that. So I would apprecitiate if someone could lead me a helping hand to help me solve the problem. And I apologies for my rambling and lack of English skills.

THANKS !!!


In reply to How to approach this? by Anonymous Monk

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.