I have the following line:
This *is* a *test*!
I want bold words surrounded by * characters (so "is" and "test" in the example).
I have the following JavaScript code:
var data = "This *is* a *test*!"; return data.replace(/\*(.*)\*/g, <b>$1</b>);
When the string returns, I get the following:
This <b>is* a *test</b>!
How to change the template or base code to make the replacement the way I want?
source share