I am trying to replace a string text9 text text to 9 only.
The code below is working but returning literally {1}
$("body").html($("body").html().replace(/text([0-9]+)[ \t]text text/g,'{1}'));
Instead of returning literally {1}, I want it to return the [0-9]+ from the search.
How would you do that with Regex?