I am needing to get the number (1) and the string (start) from this string so I can increment number, the below regex works but still has the [] around the output - anybody have a regex that will remove the []'s as well?
var $name = 'event[1][start]';
var parts = $name.match(/\[(.*?)\]/g);
console.log(parts[0] + ' - ' + parts[1]);
// I wish to do something like this eventually...
// var $newName = 'event[' + ++parts[0] + '][' + parts[1] + ']';
Many thanks