javascript regular expression
i need to rename the id attribute of an element in jquery. i need to match the following:

 - row_1
 - row_2
 - row_xx etc

this is what i have so far:
$(this).attr("id", $(this).attr("id").replace($(this).attr("id").match(/\[row_[0-9]+\]/), "row_"+index+""));

but this fails. my reg ex is faulty i think. please help
thanks
javascript regular expression
===

i need to rename the id attribute of an element in jquery. i need to match the following:

 - row_1
 - row_2
 - row_xx etc

this is what i have so far:
$(this).attr("id", $(this).attr("id").replace($(this).attr("id").match(/\[row_[0-9]+\]/), "row_"+index+""));

but this fails. my reg ex is faulty i think. please help
thanks