JavaScript: Strip HTML, and get UpperCase and LowerCase words

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.

<script type="text/javascript">
String.prototype.stripHTML = function()
{
        var matchTag = /<(?:.|s)*?>/g;
        return this.replace(matchTag, "");
};
// get Upper case words
String.prototype.getUpperCaseWords = function()
{
        var matchTag1 = /b([A-Z])+b/g;
        var o = this.match(matchTag1);
        return o;
};
// get Lower case words. This first letter Capital and other lowercase as lowercase word. Ex. Everybody.
// It will be treated as lowercase and match.
String.prototype.getLowerCaseWords = function()
{
        var matchTag1 = /b([a-zA-Z]){1,1}([a-z])+b/g;
        var o = this.match(matchTag1);
        return o;
};
var Str = "<span style=''>MY name is SATYA PRAKASH.</span><B>HELLO Everyone</B>";
var out1 = Str.stripHTML();
var out2 = out1.getUpperCaseWords(); // MY,SATYA,PRAKASH,HELLO
var out3 = out1.getLowerCaseWords(); // name,is,Everyone
alert(out2);
alert(out3);
var out4 = Str.stripHTML().getUpperCaseWords();
alert(out4);
</script>
Comments are open for an year period. Please, write here on Facebook page.