I use vim and have a large text file containing some html abandoned in throoghout. I am trying to prepare it for the Internet and add <p></p> tags to strings that are not formatted yet. Here is an example of what I have:
Paragraph text one one line [... more ... ] Other paragraph text on the next line [... more ... ] <h1>html element thrown in on its own line</h1> More paragraph text [... more ... ] <!-- some other element (always own line) --> There is still more text!
Iām looking for a way to find lines that do not start with a < character, and for these lines add opening and closing <p></p> tags ... so that then my file resembles this:
<p>Paragraph text one one line [... more ... ] </p> <p>Other paragraph text on the next line [... more ... ] </p> <h1>html element thrown in on its own line</h1> <p>More paragraph text [... more ... ] </p> <!-- some other element (always own line ) --> <p>There is still more text! </p>
How to find strings that do not match the start character < ?
source share