title: Regular expression to replace number in increment order in TextPad
body: <p>I want to replace increment number using regular expression in TextPad. I have below code and I want increment number between tag <code>&lt;EndToEndId&gt;</code> and <code>&lt;/EndToEndId&gt;</code> and number should remain 8 digits. </p>
  
  <pre><code>        &lt;PmtId&gt;
             &lt;EndToEndId&gt;80000001&lt;/EndToEndId&gt;
          &lt;/PmtId&gt;
          &lt;PmtTpInf&gt;
                &lt;Prtry&gt;PM&lt;/Prtry&gt;
          &lt;/PmtTpInf&gt;
         &lt;PmtId&gt;
         &lt;PmtId&gt;
             &lt;EndToEndId&gt;80000002&lt;/EndToEndId&gt;
          &lt;/PmtId&gt;
          &lt;PmtTpInf&gt;
                &lt;Prtry&gt;PM&lt;/Prtry&gt;
          &lt;/PmtTpInf&gt;
         &lt;PmtId&gt;
         ......
         &lt;PmtId&gt;
             &lt;EndToEndId&gt;800000010&lt;/EndToEndId&gt;
          &lt;/PmtId&gt;
          &lt;PmtTpInf&gt;
                &lt;Prtry&gt;PM&lt;/Prtry&gt;
          &lt;/PmtTpInf&gt;
         &lt;PmtId&gt;
  </code></pre>
  
  <p>I have tried myself to come up with solution but after 80000009, it gives 800000010 which is 9 digit number. </p>
  
  <p>I have provided below regular expression in <em>Find And Replace</em> option in TextPad.</p>
  
  <p>Find What: <code>(&lt;EndToEndId&gt;).*?(&lt;/EndToEndId&gt;)</code>
  Replace With: <code>(&lt;EndToEndId&gt;)\i(&lt;/EndToEndId&gt;)</code></p>
  
  <p>I have searched similar solution on Stackoverflow using Notepadd++ from <a href="https://stackoverflow.com/questions/7602816/notepad-incrementally-replace">Notepad++ incrementally replace</a>
   but it doens't give increment number when there are other tags like <code>&lt;PmtId&gt;, &lt;PmtTpInf&gt;</code> </p>
  
  <p>Could you please help me to solve this issue as I have tried myself a lot and now asking on Stackoverflow. Thank you. </p>