easiest is probably to use a regex match and then use .toUpperCase on the match. I modified the regex slightly to add in a second capture group
var str = 'something';
var arr = /<([\w]+)([^>]*>.*?<\/)\1>/.exec(str);
str = '<' + arr[1].toUpperCase() + arr[2] + arr[1].toUpperCase() + '>';