| |
|
lordrambo
|
  |
| Joined: 16 Jun 2009 |
| Total Posts: 20628 |
|
|
| 16 Nov 2014 02:49 PM |
if tonumber(string) then end |
|
|
| Report Abuse |
|
|
Xsitsu
|
  |
| Joined: 28 Jul 2009 |
| Total Posts: 2921 |
|
|
| 16 Nov 2014 02:57 PM |
local string = "This is my string" for v in string.gmatch(string, "%D") do print("Non numeric character found!") end
This code will check the string against a certain pattern to see if there are any matches within it. For every match that is found, the code within the loop will run. This bit of code will check for any character that is not a numeric character within the string. For every character it finds, it will print that it has found it.
I should probably also mention that whitespace characters count as not being numeric characters.
You should be able to use code structured somewhat like this to get the results you want.
You may want to read up on this wiki article for more information on patterns: http://wiki.roblox.com/index.php?title=Patterns
|
|
|
| Report Abuse |
|
|
| |
|
|
| 16 Nov 2014 03:20 PM |
| if String:match("%d") == String then |
|
|
| Report Abuse |
|
|