title: Moving HTML tags/elements automatically with text editor
body: <p>I have about 1500 html files, and all of them have an html <code>&lt;audio&gt;</code> tag inside the <code>&lt;main&gt;</code> tag, generally found near the beginning of the <code>&lt;main&gt;</code> tag.</p>
  
  <p>We need to move all these <code>&lt;audio&gt;</code> tags to right before the closing <code>&lt;/main&gt;</code> tag.</p>
  
  <p>Since we are talking about 1500 html files, is there a way to automate this task?</p>
  
  <p>for clarity, we have pages like this:</p>
  
  <pre><code>    &lt;main&gt;
          &lt;p&gt;Some text&lt;/p&gt;
          &lt;audio src="someaudio.mp3"&gt;&lt;/audio&gt;
          &lt;p&gt;Some text&lt;/p&gt;
          &lt;p&gt;Some text&lt;/p&gt;
      &lt;/main&gt;
  </code></pre>
  
  <p>and want to fix them to this:</p>
  
  <pre><code>    &lt;main&gt;
          &lt;p&gt;Some text&lt;/p&gt;
          &lt;p&gt;Some text&lt;/p&gt;
          &lt;p&gt;Some text&lt;/p&gt;
          &lt;audio src="someaudio.mp3"&gt;&lt;/audio&gt;
      &lt;/main&gt;
  </code></pre>
  
  <p>Each audio tag is custom to each page.</p>
  
  <p>Each page is different.</p>
  
  <p>I use notepad++ usually, I'm working on a windows environment.</p>
  
  <p>No javascript. This must be done to the html file directly.</p>
  
  <p>EDIT: Edited for clarity, sorry about that.</p>