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