使用Math与RegExp结合
Let gameName="AFGA捕鱼";
if (gameName.match(RegExp("捕鱼"))) {
let fishing = obj.data.gameData.fishing;
console.log(fishing);
}
参考地址:https://www.php.cn/faq/473880.html
标签:捕鱼,www,gameName,javascript,某个,fishing,字符串,RegExp From: https://blog.51cto.com/jition/7193719