I have a series of HTML files that contain two lines like this:
<body> <h1>Title</h1><p> <a href="url">Description</a><br>
I want to replace this text with something else using a bash script. I'm trying
sed -i -r 's/<h1>Title.*?$\/^.*?<br>/Replacement text/1' filename.html
but it is not working. I'm suspecting it is getting stuck on the new line and not knowing how to go around the problem.
Any help appreciated. Feel free to suggest other Linux tools other than
sed as long as it works!