【发布时间】:2019-02-22 19:16:54
【问题描述】:
我有这个字符串
"red col. yellow; col. black; col. green; orange; col. white; blue col. purple;"
我需要黄色、黑色、绿色、白色、紫色,只是没有“col”的颜色。和 ';'并将此字符串更改为:
"red col. < a>yellow<\a> ; col. < a>black<\a> ; col. < a>green<\a>; orange; col. <a>white<\a>; blue; col. < a>purple<\a>;"
如何使用 javascript reg exp 制作它,请帮助
【问题讨论】:
-
到目前为止你尝试了什么?
标签: javascript regex replace match