I am trying to surround dates in middleRsults with tags:
var middleRsults = "95.00 04/07/15 aaaa 10/02/15 ";
var regex =/\d{2}\/\d{2}\/\d{2}/g;
var x= middleRsults.replace(regex,"<b>$1</b>")
What I want to get:
95.00 <b>04/07/15</b> aaaa <b>10/02/15</b>
instead, what I actually get:
95.00 <b>$1</b> aaaa <b>$1</b>
I search a lot, but couldn't figure out why this is happening with this specific regex that I am using.
$1means, and what other special replacement patterns are available.