In my string labeled as 'content', I have the phrase "data-RowKey=xxx" embedded within it. I attempted to extract the 'xxx' portion using the code snippet below:
var val = content.substring(12 + content.indexOf("data-RowKey="), 3);
Unfortunately, this approach was unsuccessful. Instead of retrieving only three characters, I ended up with a lengthy string. Could someone identify the error in my code?