So I am using string.gsub() to get everything that has "Hi" in it and doesn't have quotation marks around them to be replaced with "Bye"

Example:

local Test = "Hi"--Changes because it doesn't have quotation marks around it
local Test2 = ' "Hi" '--Doesn't change because it has quotation marks around it

How do I also change it in the same string like:

local Test = 'Hi "Hi" '--Output is: Bye "Hi"

2 comments

0

Could you explain more?

0

So basicly, if the string has quotation marks around them it doesn't change, if it doesn't have quotation marks around them it changes to another string