SyntaxFix
Write A Post
Hire A Developer
Questions
var text = 'price[5][68]'; var regex = /price\[(\d+)\]\[(\d+)\]/gi; match = regex.exec(text);
match[1] and match[2] will contain the numbers you're looking for.