As you see, this is not restricted to a particular list of html codes, and that is what I want!$_ = "test;a &lt;>amp;kap;&da;ma; & alfa&romeo & mich;"; while ( s/([&][^ ]*);(?!( |&|$))/\1AMPSEMICOLON/ ) {}; s/AMPSEMICOLON/;\&/g; # Output: test;a &<>&&kap;&da;&ma; & alfa&romeo & mich;
In reply to Re: Question for regex experts
by evgen-i
in thread Question for regex experts
by evgen-i
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |