On Saturday 07 September 2002 05:37 pm, pelp wrote:
> 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 !!!


How about something like this (from the command line):
 perl -p -i.bak -w -e 's/<FStrike Yes>//g' test.txt  

nyec

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to