in reply to How to substitute all the words before a certain word in the middle of a line?
ors/\b\w+\s+nice\b/A nice/g;
should work$w = 'nice'; $r = 'A'; s/\b\w+(\s+$w)\b/$r$1/g;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: How to substitute all the words before a certain word in the middle of a line?
by le (Friar) on Jul 12, 2000 at 11:19 UTC | |
by vkonovalov (Monk) on Jul 12, 2000 at 11:36 UTC |