title: Ruby: Conditional replace in String using gsub
body: <p>Given an input string:</p>
  
  <pre><code>&lt;m&gt;1&lt;/m&gt;
  &lt;m&gt;2&lt;/m&gt;
  &lt;m&gt;10&lt;/m&gt;
  &lt;m&gt;11&lt;/m&gt;
  </code></pre>
  
  <p>I would like to replace all values that are not equal to <code>1</code> with <code>5</code>.<br>
  So the output String should look like:</p>
  
  <pre><code>&lt;m&gt;1&lt;/m&gt;
  &lt;m&gt;5&lt;/m&gt;
  &lt;m&gt;5&lt;/m&gt;
  &lt;m&gt;5&lt;/m&gt;
  </code></pre>
  
  <p>I tried using:</p>
  
  <pre><code>gsub(/(&lt;m&gt;)([^1])(&lt;\/m&gt;)/, '\15\3')
  </code></pre>
  
  <p>But this will not replace <code>10</code> and <code>11</code>.</p>