how to remove lines from a text using regex? : <p>I have scraped some data but when i wanna import  it into wordpres theres always a like space</p>

<p>i want to import it like this:</p>

<p><a href="https://i.stack.imgur.com/7Q0Dd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7Q0Dd.png" alt="enter image description here"></a></p>

<p>any solutions. please keep in mine im an absolute noobie just wanna know if theres a simple way to remove these lines</p>
