I wrote a regular expression which I expect should work but it doesn\'t.
var regex = new RegExp(\'(?<=\\[)[0-9]+(?=\\])\')
Javascript
To increment multiple numbers in the form of lets say:
var str = '/a/b/[123]/c/[4567]/[2]/69';
Try:
str.replace(/\[(\d+)\]/g, function(m, p1){ return '['+(p1*1+1)+']' } ) //Gives you => '/a/b/[124]/c/[4568]/[3]/69'