Hello. For some reason, string functions are kind of broken when using ** as a parameter?
For example: string.gsub(“** test text , "”, “replacement”) will return “replacementreplacement test replacement text replacementreplacement” and apparently 5 occurrences, when there is only 2.
string.find(“text**”, “**”) will return 1, 0, which isn’t correct.
Is there any special meaning for ** in a string? (* and *** seems to work fine)
* is a repetition that matches 0 or more of a certain character as much as possible. If it isn’t preceeded any quantifiable token, * will act like a literal *.
There’s a 4th argument named plain to turn this off in string.find: string | Documentation - Roblox Creator Hub or you can use %* to match the literal *