InterviewSolution
| 1. |
How Do I Change Only One Section Of A File? |
|
Answer» You can match a RANGE of LINES by line number, by regexes (say, all lines between the WORDS "from" and "until"), or by a combination of the two. For multiple substitutions on the same range, put the command(s) between braces {...}. For example: # replace only between lines 1 and 20 You can match a range of lines by line number, by regexes (say, all lines between the words "from" and "until"), or by a combination of the two. For multiple substitutions on the same range, put the command(s) between braces {...}. For example: # replace only between lines 1 and 20 |
|