in reply to Writing to a file
But I don't think that's what you meant. That means your sample input & output isn't representative enough of the actual problem.$ cat file.txt old/path/to/some/file another/old/path/to/some/file one/more/old/path/to/some/file $ perl -pe 's#\bold(?=/path/to/some/)#new#g' file.txt new/path/to/some/file another/new/path/to/some/file one/more/new/path/to/some/file
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Writing to a file
by victorz22 (Sexton) on May 05, 2017 at 20:37 UTC | |
by AnomalousMonk (Archbishop) on May 05, 2017 at 22:21 UTC | |
by Laurent_R (Canon) on May 05, 2017 at 21:09 UTC | |
by victorz22 (Sexton) on May 05, 2017 at 21:44 UTC |