Printing text between two blank lines

2008-02-16 Thread PlagueMagazine
I've been trying to use regular expressions or some kind of counter thing, but I can't seem to work this right. I have data in a text file where the important thing I want to extract is between two blank lines. That's the only systematic way to find the useful lines. So, it'll go "blank line, impo

Re: regexp not working past one character

2008-02-04 Thread PlagueMagazine
On Feb 3, 8:36 pm, [EMAIL PROTECTED] (Chas. Owens) wrote: > On Feb 3, 2008 12:07 PM, <[EMAIL PROTECTED]> wrote: > > > On Feb 2, 11:10 pm, [EMAIL PROTECTED] (John W. Krahn) wrote: > > > [EMAIL PROTECTED] wrote: > > > > I have a program with a line like > > > > > while () { > > > > if (/stuff/i

Re: regexp not working past one character

2008-02-03 Thread PlagueMagazine
On Feb 2, 11:10 pm, [EMAIL PROTECTED] (John W. Krahn) wrote: > [EMAIL PROTECTED] wrote: > > I have a program with a line like > > > while () { > > if (/stuff/i) { > > print; > > } > > } > > > When I run the program, and I replace "stuff" with only one character, > > like "d", it

regexp not working past one character

2008-02-02 Thread PlagueMagazine
I have a program with a line like while () { if (/stuff/i) { print; } } When I run the program, and I replace "stuff" with only one character, like "d", it works exactly as I expect. But if instead of using "d", I use "da" or "date" (which I know are in FILE, because it's a te

Re: Searching text file and printing to new file

2008-01-17 Thread PlagueMagazine
On Jan 14, 5:08 pm, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote: > [EMAIL PROTECTED] wrote: > > I'm a nearly absolute beginner to Perl, > > Then this site ought to be useful:http://learn.perl.org/ > > > and a lot of the text manipulation things confuse me. > > Really? Which things specifically, an

Searching text file and printing to new file

2008-01-14 Thread PlagueMagazine
I'm a nearly absolute beginner to Perl, and a lot of the text manipulation things confuse me. I have a large text file with information essentially broken into lines like this: findable text with a regexp information I care about more findable text There are plenty of sections like this in the fi