in reply to Re: regular expression
in thread regular expression
For each line, it either prints the line plus hello (if it's the marker line) ...That is not entirely true.
The test checks if the line contains the literal text "The marker line", but there could be other text before or after it. However, it wil then only print "The marker line" into the file, actually discarding some "garbage" text.
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: regular expression
by ikegami (Patriarch) on Nov 01, 2010 at 15:58 UTC |