This is my string
<input name="e8[1][4]" value="" type="hidden">
<input name="e10[1][4]" value="" type="hidden">
<input name="e8[1][4]" value="" type="hidden">
<input name="e10[1][4]" value="" type="hidden">
<input name="e6[1][4]" value="" type="hidden">
<input name="e9[1][4]" value="" type="hidden">
<input name="e6[1][4]" value="" type="hidden">
I have to change all second array element with +1. it shoud be my output
<input name="e8[1][5]" value="" type="hidden">
<input name="e10[1][5]" value="" type="hidden">
<input name="e8[1][5]" value="" type="hidden">
<input name="e10[1][5]" value="" type="hidden">
<input name="e6[1][5]" value="" type="hidden">
<input name="e9[1][5]" value="" type="hidden">
<input name="e6[1][5]" value="" type="hidden">
How I achieve this format with jquery or regexsolution. i make following regex to get last number of string how i work ahead
var patt1 = /(\d+)(?!.*\d)/;