I'm trying to alter all "href=" parameters and their values in some html files. I'm trying to use sed for this.
An example of an html line is this:
<a href="
My current sed regex looks like this:
s/href="(.+)"/href="#"/g
which I am trying to locate href=" any/all within " and replace it with
href="#" so the link becomes inactive.
Could someone please explain how once the href=" is found alter everthing between that and the closing " and replace with the "#" phrase? so the resulting html link would look like this:
<a href="#">whatever</a>
Thanks for helping my headache!
An example of an html line is this:
<a href="
My current sed regex looks like this:
s/href="(.+)"/href="#"/g
which I am trying to locate href=" any/all within " and replace it with
href="#" so the link becomes inactive.
Could someone please explain how once the href=" is found alter everthing between that and the closing " and replace with the "#" phrase? so the resulting html link would look like this:
<a href="#">whatever</a>
Thanks for helping my headache!