in reply to Expression evaluation in search and replace regex
Seems a bit better than replacing pieces with identical copies of themselves.....s/(?<=apple)(banana)(?=chocolate)/$fruitcolors{$1}/i;
Update: removed superfluous /e that japhy points out below
-Blake
|
|---|