in reply to How to approach this?

The approach depends on your requirements: if you want a robust script, then you may want to investigate parsers. However, if all you want is a quick hack; then you can think of it as a simple 2-state state machine: have you seen an "Fstrik yes" line since the previous string, or not.
my $seen_Fstrik_yes = 0; while (<>) { if ($seen_Fstrik_yes && /<String '.*?'>) { $seen_Fstrik_yes = 0; } else { print; $seen_Fstrik_yes |= /<FStrik Yes>/; } }
This method only works as a quick hack, and assumes a very specific format for its input. --Dave

Replies are listed 'Best First'.
Re: Re: How to approach this?
by Anonymous Monk on Sep 08, 2002 at 01:43 UTC
    Hmmm... parsers? Do you recommend any material?

    I did some NET searching but couldn't fine anything good.