鉴于:
Ya its a great day.
查找(在 1 个正则表达式语句中同时执行)
Ya => Ya + cat
great => great + cat
我怎么能做这样的事情?
"Ya its a great day".replace(/found=(Ya|great)/g, found + " cat");
输出:
Ya cat its a great cat day.
鉴于:
Ya its a great day.
查找(在 1 个正则表达式语句中同时执行)
Ya => Ya + cat
great => great + cat
我怎么能做这样的事情?
"Ya its a great day".replace(/found=(Ya|great)/g, found + " cat");
输出:
Ya cat its a great cat day.