Hello,
I figured out how to substitute. But I need howto help as I didn't know
how to print out my desired matched items. Thanks!
Instead of the substitution, I want to match and keep. In other words,
I want to extract and keep/print <comment>up to the blank line
so that the output will be:
<comment>semester of 2002.
involvement began in the Spring of 2001.
requesting and obtaining a regarding my
---begin source file---
with a matter that consumed or occupied a
during the fall <comment>semester of 2002.
involvement began in the Spring of 2001.
requesting and obtaining a regarding my
There were several reports to review.
to and continued during the fall semester
----end source file---
#!/perl/bin/perl -w
undef $/; # Enter "file slurp" mode.
$text = <>; # This file/selection slurped into the scalar
for ($text =~ s/<comment>.*\n\n/<<here>>\n\n\n\n/) {
print $text;
}
--
Alan.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
- Re: Text match criteria Alan C.
- Re: Text match criteria Rob Dixon