Perl: the Markov chain saw | |
PerlMonks |
Re: Replacing exactly the found instance in REGEXby sathiya.sw (Monk) |
on Dec 09, 2008 at 12:09 UTC ( [id://729140]=note: print w/replies, xml ) | Need Help?? |
A simple change in your code would achieve this,
Change which am asking you to do is simple, is called as lookarounds in regex. (?<=TEXT) --> mean look behind. (?!=TEXT) --> mean look ahead. So you wanted traderid to be presented in both the side, by confirming that again in the substitution you can achieve it.
Sathiya
In Section
Seekers of Perl Wisdom
|
|