Don't ask to ask, just ask | |
PerlMonks |
Re: not able to replace the element in the middle of the stringby Laurent_R (Canon) |
on Jul 12, 2016 at 10:43 UTC ( [id://1167602]=note: print w/replies, xml ) | Need Help?? |
You have to specify how to determine which "aa" sequence to replace. Assuming you want to replace any "aa" sequence that is neither at the beginning, not at the end, of the string, you may want to use a look-behind and a look-ahead assertion. This is an example under the Perl debugger:
HTH.
In Section
Seekers of Perl Wisdom
|
|