troubleshooting Question

using sed to modify html

Avatar of ugeb
ugebFlag for United States of America asked on
Unix OSRegular Expressions
13 Comments2 Solutions814 ViewsLast Modified:

I have a series of html files on which I need to do some group maniuplation.  What would be the sed command to find all href's and replace the string with my own string?

For example,  replace all occurrences of:

<a href="this string could vary considerably">


<a href="" title="Call me!">

Note that I can't use a constantt string for the first href because I don't know what will be between the quotes, so I'm guessing it needs some sort of pattern matching.



Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 13 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros