I am trying to replace each set of wildcard symbols (**
) with tags (<p></p>
).
For example, if I have:
var stuff = array(
"The color *blue*!!!!",
"The color *red*!!!!",
"The colors *red* and *blue*!!!!"
);
I want to output:
var stuff = array(
"The color <p>blue</p>!!!!",
"The color <p>red</p>!!!!",
"The colors <p>red</p> and <p>blue</p>!!!!"
);
What would be the most efficient way to do this?