【发布时间】:2022-01-02 06:06:09
【问题描述】:
您好,我正在尝试将特定文本替换为“”,但我的代码不起作用。我只是不知道为什么我的代码不起作用
b = 'Just testing.<script>window.location.replace("http://google.com");</script>'
print(b)
b = b:gsub('<script>window.location.replace("http://google.com");</script>', "")
print(b)
输出 1:只是 testing.window.location.replace("http://google.com");
出2:只是 testing.window.location.replace("http://google.com");
我也试过b = string.gsub(b,'<script>window.location.replace("http://google.com");</script>',""),但它也不起作用
我在 FiveM 工作
【问题讨论】: