J
Jean
I have been trying this for hours without luck so far... Needless to
say my regular expression skills are bad...
I have some urls in an HTML page that have the amperstand sign (&) in
them, and I want to change only these amperstand into %26.
For example:
<a href="cgi-bin/test.cgi?var1=1&var=2">Bob & Paul</a> & Steve.
Should become:
<a href="cgi-bin/test.cgi?var1=1%26var=2">Bob & Paul</a> & Steve.
I have tried 100s of variation on this:
$content =~ s/\s*=\s*[A-Za-z0-9]&/=$1%26/g;
But of course it does not work.
Any help would be greatly appreciated... thanks.
Jean
say my regular expression skills are bad...
I have some urls in an HTML page that have the amperstand sign (&) in
them, and I want to change only these amperstand into %26.
For example:
<a href="cgi-bin/test.cgi?var1=1&var=2">Bob & Paul</a> & Steve.
Should become:
<a href="cgi-bin/test.cgi?var1=1%26var=2">Bob & Paul</a> & Steve.
I have tried 100s of variation on this:
$content =~ s/\s*=\s*[A-Za-z0-9]&/=$1%26/g;
But of course it does not work.
Any help would be greatly appreciated... thanks.
Jean