Let's say I have this string:
s = "ABCDEFGHIJKL2MNOPQRSTUVWXYZ"
How would I remove the 2 from it without necessarily knowing its location within the string?
I'm not particularly sure, but wouldn't it be something like this:
s = "ABCDEFGHIJKL2MNOPQRSTUVWXYZ"
string.gsub(s,"%d","")
-[::ƧѡÎḾḠΰῩ::]-
-[::Maker of stuff and Helper of Scripting::]-
s = s:gsub("2","")
Gsub looks for any instance of "2", and replaces it with nothing.
"%d" would look for any digit (i.e. 0-9).
You can look up "lua string patterns" for a basic tutorial on it.
s=s:gsub(%D,"")
A capital letter represents the complement of a character class. In this case, the complement of the digit character class are symbols, letters, etc. (Non-digits).