var re=/world|people|Pizar/g
var str = "Disney films are favored by people all around the world, it is known to all that many of the movies are produced by Pizar animation studio";
有一个正则表达式,还有一个字符串,我想为这个字符串中所有匹配正则表达式的单词分别都加上一个< span >包裹起来,例如:< span >world< /span >一样。请问怎么才能办到呢?