hi friend,

pls try to do it. its working well.

$str =~ s/&(\w+)/{$1}/gs;