tcf03 has asked for the wisdom of the Perl Monks concerning the following question:
what I want to do is take each line that begines with ^\w.* up until, but not including the next ^\w.*TEST: line 1 line 2 line 3 line 4 TEST2: line 1 ...
the actual data is this:TEST (line 1) (line 2) (line 3) (line 4) TEST1 (line 1) (line 2) (line 3) (line 4)
where I would output:r_acctng: printer is on device 'socket' speed -1 queuing is enabled printing is disabled no entries daemon present r_acctng_8150: printer is on device 'socket' speed -1 queuing is enabled printing is disabled no entries daemon present R_NETADMIN: printer is on device 'socket' speed -1 queuing is enabled printing is disabled no entries daemon present
r_acctng,queueing enabled,printing disabled
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Matching text between line 0 and 4
by Roy Johnson (Monsignor) on Mar 17, 2005 at 19:50 UTC | |
by JediWizard (Deacon) on Mar 17, 2005 at 20:01 UTC | |
|
Re: Matching text between line 0 and 4
by ikegami (Patriarch) on Mar 17, 2005 at 19:56 UTC | |
|
Re: Matching text between line 0 and 4
by TedPride (Priest) on Mar 17, 2005 at 20:48 UTC |