title: Make text content between specified HTML tags toUpperCase in React-Native
body: <p>I want to make to uppercase the contents of specific HTML tags with plain JavaScript in a React-Native application.</p>
  
  <p><strong>Note</strong>: This is a React-Native application. There is no JS <code>document</code>, available, nor jQuery. Likewise, CSS <code>text-transform: uppercase</code> cannot be used because it will not be displayed in a web browser.</p>
  
  <p>Let's say, there is the following HTML text:</p>
  
  <pre><code>&lt;p&gt;This is an &lt;mytag&gt;simple Example&lt;/mytag&gt;&lt;/p&gt;
  </code></pre>
  
  <p>The content of the Tag <code>&lt;mytag&gt;</code> shall be transformed to uppercase:</p>
  
  <pre><code>&lt;p&gt;This is an &lt;mytag&gt;SIMPLE EXAMPLE&lt;/mytag&gt;&lt;/p&gt;
  </code></pre>
  
  <p>I tried this code:</p>
  
  <pre><code>let regEx = storyText.match(/&lt;mytag&gt;(.*?)&lt;\/mytag&gt;/g)
  if(regEx) storyText = regEx.map(function(val){
    return val.toUpperCase();
  });
  </code></pre>
  
  <p>But the <code>map()</code> function returns only the matched content instead of the whole string variable with the transformed part of <code>&lt;mytag&gt;</code>.</p>
  
  <p>Also, the <code>match()</code> method will return null, if the tag wasn't found. So a fluent programming style like <code>storyText.match().doSomething</code> isn't possible.</p>
  
  <p>Since there are more tags to transform, an approach where I can pass variables to the regex-pattern would be appreciated.</p>
  
  <p>Any hints to solve this?</p>
  
  <p><sub>(This code is used in a React-Native-App with the <a href="https://github.com/jsdf/react-native-htmlview" rel="nofollow"><code>react-native-html-view</code> Plugin</a> which doesn't support <code>text-transform</code> out of the box.)</sub></p>