I have lines from a web page of the form
<a href="url with spaces">description with spaces</a>
which I want to convert to a csv format
"url%20%with%20spaces","description with spaces"
to feed into a mediawiki page that expects external links to be [url%20%with%20spaces description with spaces] (and I don't want that page to be cluttered with #rreplace)
sed -Ee 's`.*href="(.*)">(.*)</a>.*`"\1","\2"`'
can split the url, but I can't see an easy way to do a further substitution of space with %20 in just \1 without affecting \2