String Remove [ HOW ]

How to make let’s say I have a string = " ‘’‘abc’’’ " (string between three quotation mark or i don’t know what, like in DevForum Preformatted Text, and only print the abc.

You can use string.match to match letter only in string

print(string.match("‘’‘abc’’’", "%a+")) --abc

Try this:

local string1 = string.gsub( " ‘’‘abc’’’ ", "’", " ") --- ‘‘abc
local finalString = string.gsub(string1, "‘", " ") --- abc
print(finalString)

print(string.split("```abc```", "```")[2])

1 Like