in reply to skipping lines when parsing a file
It might be helpful if you told us what patterns you were looking for using English, because your regexes seem a bit strange.
As for solving your basic problem (print until X line, then stop until Y line, then start again), you might consider a state machine; that is, use a global variable that keeps track of whether you're printing or not, and change it inside the loop if the conditions change--and then just print at the end of the loop when the variable tells you you're supposed to be printing.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: skipping lines when parsing a file
by lomSpace (Scribe) on Aug 20, 2009 at 13:41 UTC | |
by ssandv (Hermit) on Aug 20, 2009 at 14:51 UTC | |
by lomSpace (Scribe) on Aug 20, 2009 at 17:02 UTC | |
by ssandv (Hermit) on Aug 20, 2009 at 17:46 UTC | |
by lomSpace (Scribe) on Aug 20, 2009 at 17:42 UTC | |
by ssandv (Hermit) on Aug 20, 2009 at 17:50 UTC |