OK. I am reading a file. This line is at the bottom of the
file and the "****-----------******" is a sign that the section is complete.
I need to be able to pick up that line, and see if there is
also code on the beginning of that line that I need to save.
So in this case I was searching for words (with colon's)
and perhaps other code that precedes the "****----****"
and to try and discard the end of the line. (After the word
FILING, there is a page break character, but it's all being
read in as one line.)
This is a sample of the line:
Comment: FILING
****------------------------------------------------------------------------****
That's why I tried (and failed :>) with this:
if (/(\w+:?\s*\w*:?)+(.*?\*+\s*-+\s*\*+\s*)$/) {
s/$2//;
}
I hope that helps.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>