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 reply to Re: Avoid recursive replacement using regex
by Loops
in thread Avoid recursive replacement using regex
by anirudhkumar_r
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |