I need a way to check if a sentence is written in quotes inside a string and if so then it wont replace the word with something else.
Any help is appreciated.
I need a way to check if a sentence is written in quotes inside a string and if so then it wont replace the word with something else.
Any help is appreciated.
if string.find(String, "\"") then
This will search for a quotation character in a string. Please share an example if that isn’t what you meant.
I would suggest using the %bxy
pattern
The balanced capture matching x
, y
, and everything between (for example, %b()
matches a pair of parentheses and everything between them)
for quotes you would use a pattern like so:
local capture = string.match(TEXTHERE, '%b""')
No but I need a way to check if its in quotes.