I want to use a regular expression to grab ONLY uppercase characters within a <p></p> html tag.
<p>I WANT TO GET THIS TEXT</p>
<p>I don't want to get this text because it has some Lower Case Characters</p>
Sometimes the document doesn’t contain this at all. Sometimes it’s there 3-5 times. The document DOES contain other HTML within <p></p> tags which I don’t want to change. Only the paragraph tags which contain ALL Uppercase characters I want to return.
I not very familiar with regular expressions so this is stumping me. It seems like I should be able to do something like this: <p>[A-Z]</p>
Once I find the uppercase text, I want to pass the data through a ProperCase function and re-insert the data as a <H3> tag.
Try this:
This evaluates to:
<p>I WANT TO GET THIS TEXT</p><p>I DON'T WANT TO GET MIXED CASE TEXT 123.</p><p>I don't want to get this text because it has some Lower Case Characters</p>