menu
Roblox Forum Archive
Home
User Search
Forums
Donate
search
settings
Home
User Search
Forums
Donate
launch
Go to User Dashboard
Forums
Scripters
Restricting symbols
chevron_left
chevron_left
chevron_left
of
1
chevron_right
chevron_right
chevron_right
Restricting symbols
CRICKET69
Join Date: 2012-02-14
Post Count: 208
#228117723
Sunday, November 26, 2017 11:16 PM GMT
Is there a way to detect whether there are symbols/anything other than actual letters in a textbox?
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
TaaRt
Join Date: 2009-04-26
Post Count: 5070
#228118261
Sunday, November 26, 2017 11:25 PM GMT
string.gsub("somet23^7hing","%A","") -- returns only the letters string.find("somet23^7hing","%A") -- not nil if there are any non-letters
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
guagiguagua
Join Date: 2016-12-15
Post Count: 206
#228118300
Sunday, November 26, 2017 11:26 PM GMT
yeah, string .match and your symbols being the string pattern %b x y
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
CRICKET69
Join Date: 2012-02-14
Post Count: 208
#228118577
Sunday, November 26, 2017 11:31 PM GMT
How exactly would you use gsub into a if statement?
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
CRICKET69
Join Date: 2012-02-14
Post Count: 208
#228119629
Sunday, November 26, 2017 11:50 PM GMT
bump
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
cabbler
Join Date: 2015-06-19
Post Count: 735
#228121865
Monday, November 27, 2017 12:21 AM GMT
local isSymbol = str:match("[%s%w%p]") == nil but I might make a function with string.byte
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
chevron_left
chevron_left
chevron_left
of
1
chevron_right
chevron_right
chevron_right