ors/\b\w+\s+nice\b/A nice/g;
should work$w = 'nice'; $r = 'A'; s/\b\w+(\s+$w)\b/$r$1/g;
In reply to Re: How to substitute all the words before a certain word in the middle of a line?
by vkonovalov
in thread How to substitute all the words before a certain word in the middle of a line?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |