-
What do you want to achieve? Keep it simple and clear!
I am trying to doing something where it checks if a string has 2 uppercase characters for a system I’m making. -
What is the issue? Include screenshots / videos if possible!
I can’t seem to match the 2nd uppercase character that is elsewhere in the string. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I’ve tried to match the string with 2 different lines of code, but I still only got the 1st uppercase character and not the second. I’ve looked at the string patterns article and dev forum for a while now and I can’t get it to work.
My code is along the lines of this:
local String = string.match("DestinationName", "%u+") -- Doesn't work. Only returns "D".
if string.len(String) == 2 then
-- Do something
end