in reply to Substitute problem
Try
s/(?<!_n)\@mail\.ab\.com/_n\@mail.ab.com/g;
The zero-width negative look-behind, (?<!_n) says only match if the @ sign is NOT preceded by the _n. Ie. if the address already has the '_n' it won't be modified.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Substitute problem
by Anonymous Monk on Jul 30, 2003 at 21:28 UTC | |
by BrowserUk (Patriarch) on Jul 30, 2003 at 21:35 UTC | |
by Anonymous Monk on Jul 30, 2003 at 21:42 UTC |