in reply to Avoid recursive replacement using regex
Sure, just translate this into JavaScript:
Prints:my %k = qw(l < g > & &); print "$_ to ".s/(&)amp;|&(l|g)t;/$k{$+}/reg.$/ for qw( & &lt; &gt; < > );
(sorry) :P& to & &lt; to < &gt; to > < to < > to >
In Section
Seekers of Perl Wisdom