Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Avoid recursive replacement using regex

by Loops (Curate)
on Nov 25, 2014 at 12:39 UTC ( [id://1108345]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my %k = qw(l < g > & &);
    print "$_ to ".s/(&)amp;|&(l|g)t;/$k{$+}/reg.$/
       for qw( &amp; &amp;lt; &amp;gt; &lt; &gt; );
    
  2. or download this
    &amp; to &
    &amp;lt; to &lt;
    &amp;gt; to &gt;
    &lt; to <
    &gt; to >
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1108345]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-19 11:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found