Here is the input I have and the output I want:
Input:
<hr />
(newline)
( carriage return)
(tabs, spaces)<div id="sidebar">
Output:
</div>
<hr />
(newline)
( carriage return)
(tabs, spaces)<div id="sidebar">
This doesn't seem to match it:
sed -i 's/<hr \/>[[:space:]]*<div id="sidebar">/<\/div><hr \/><div id="sidebar">/g' file.txt
Hrm?