#!/usr/bin/perl use strict; use warnings; my $flag=0; while(<DATA>){ if (/\{AUTHOR\}/){ $flag=1; next; } if (/^\{/){ $flag=0; next; } print $_ if $flag; } __DATA__ {TAG} tag1 {AUTHOR} By June Fletcher JOURNAL {TAG} tag2 TOM MacCUBBIN {DATA} data1 {AUTHOR} Richard White {AUTHOR} MacCUBBIN {SOUR}
In reply to Re^5: regular expression
by Utilitarian
in thread regular expression
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |