title: Add constant value to numeric XML attribute
body: <h2>Background</h2>
  
  <p>Add a constant value to numbers matched with a regular expression, using vim (gvim).</p>
  
  <h2>Problem</h2>
  
  <p>The following regular expression will match <code>width="32"</code>:</p>
  
  <pre><code>/width="\([0-9]\{2\}\)"
  </code></pre>
  
  <h2>Question</h2>
  
  <p>How do you replace the numeric value of the <code>width</code> attribute with the results from a mathematical expression that uses the attribute's value? For example, I would like to perform the following global replacement:</p>
  
  <pre><code>:%s/width="\([0-9]\{2\}\)"/width="\1+10"/g
  </code></pre>
  
  <p>That would produce <code>width="42"</code> for <code>width="32"</code> and <code>width="105"</code> for <code>width="95"</code>.</p>
  
  <h2>Update</h2>
  
  <p>Looks like this cannot be done using regex alone -- is there a vim-way?</p>
  
  <p>Thank you!</p>