title: Regex replace "<X>" brackets
body: <p>i'm trying to make some code that'll loop over html forum data and replace some brackets.</p>
  <p>i'm basically trying to turn</p>
  <pre><code>&lt;br&gt;&lt;br&gt;
  &lt;br&gt;
  &lt;img src=&quot;blah&quot;&gt;&lt;/img&gt;
  </code></pre>
  <p>to</p>
  <pre><code>[br][br]
  [br]
  [img src=&quot;blah&quot;][/img]
  </code></pre>
  <p>and avoid changing text like</p>
  <pre><code>:&lt;
  &lt;(&quot;&lt;) &lt;(&quot;)&gt; (&gt;&quot;)&gt;
  </code></pre>
  <p>I'm using javascript and a regex pattern for now. I was able to find a regex for something between two tags, but not two tags around a string. What would be the best way to do this?</p>