title: How to write superscript for string in javascript
body: <p>Hello friend I have a data in the object section_data.title.Well I am using different </p>
  
  <pre><code>    str= str.replace(/ft2/g,"ft&lt;sup&gt;2&lt;/sup&gt;"); 
      str=str.replace(/m2/g,"m&lt;sup&gt;2&lt;/sup&gt;"); 
  </code></pre>
  
  <p>for superscript</p>
  
  <p>where str=section_data.title;
        str="Not less than 30 net <strong>ft2</strong> (2.8 net <strong>m2</strong>) per patient in a hospital or nursing home, or not less than 15 net <strong>ft2</strong> (1.4 net <strong>m2</strong>) per resident in a limited care facility, shall be provided within the aggregated area of corridors, patient rooms, treatment rooms, lounge or dining areas, and other similar areas on each side of the horizontal exit. On stories not housing bed or litterborne patients, not less than 6 net <strong>ft2</strong> (0.56 net <strong>m2</strong>) per occupant shall be provided on each side of the horizontal exit for the total number of occupants in adjoining compartments."</p>
  
  <p>How can i Write a single regular expression for both to work out? thanks</p>