News for hackers. Stuff that matters.
Re:YouTube was launched as a dating site by Kudos on Sunday July 21, 2019 @06:00PM (#20493932)
In this particular case I would just have included the starting < in the search and replace.
Re:YouTube was launched as a dating site by frereubu on Sunday July 21, 2019 @06:19PM (#20494027)
You mean div> otherwise it wouldn't pick up the closing tags :)
Re:YouTube was launched as a dating site by keerthiko on Sunday July 21, 2019 @07:05PM (#20494250)
I believe replacing `<div`\'<p' and `/div`\'/p' are preferred so you can retain any tag properties (class, id, style, etc), but it could still leave behind any tags with superfluous spaces.
Re:YouTube was launched as a dating site by codetrotter on Sunday July 21, 2019 @06:40PM (#20494119)
If you replace div> then you will miss any opening tags that have attributes. E.g. <div class=baz> or <div id=foobar>.

In Vim I would do

    :%s@\(</\?\)div@\1p@g
It’s a little bit convoluted but it replaces the tag names in both opening and closing tags and does not replace it anywhere else.
Re:YouTube was launched as a dating site by frereubu on Sunday July 21, 2019 @06:41PM (#20494126)
Fair point...