I was looking for getting all words in uppercase in HTML text using Regex. After solving through Googling and trial and error, I thought to extend the code to return all lowercase words too. <!--Actually I was helping someone on forum and there the question was only for capturing Upper case words. As, I worked on getting lower case words also, so thought to post it here.-->
It is a flexible regex code because it is written in three parts. For stripping HTML, just call first function. For stripping HTML and getting words in Capital letters, use 1st and 2nd function. These can be used one by one or in chain as well. Similarly for getting words in lower case. If HTML stripping is not required then also, Upper case and lower case regex can be used separately. Example of calling these regular expression functions are given below.