I have the content for over 1000 articles in a db. Unfortunately, the person(s) that originally entered it all left off the closing paragraph tags and used random case for the P's.
Now, is it possible to do a regex replace to correct the missing tags/case?
In other words, I have:
<p>This is a title
<P>this is a paragraph
<P>this is another paragraph
<p>this is even more text
And want to change/replace it to (via PHP):
<p>This is a title</p>
<p>this is a paragraph</p>
<p>this is another paragraph</p>
<p>this is even more text </p>
The paragraphs are much longer then the samples I gave and are not all on one line like that (or it'd be too easy...<sigh>)
I was trying to do it by adding a </p>and a line break before each <p> and then lowering the case of the <P>'s and removing the first </p>. But, I couldn't get it to work and its quite ugly anyway.
Any help would be greatly appreciated!