#!/usr/bin/perl use strict; use warnings; open IN,"StartEnd.txt" or die $!; open OUT,'>', "StartEnd_out.txt" or die $!; my $bol = 'FALSE'; while(<IN>){ if(/^=begin/){ $bol = 'TRUE'; } elsif(/^=end/){ $bol = 'FALSE'; } elsif($bol eq 'TRUE'){ print OUT $_,"\n"; } } close(IN); close(OUT);
In reply to Re: Regular expression...
by snape
in thread Regular expression...
by Anonymous Monk
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |