generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: find int in string

Previous Thread :: Next Thread 
ToasterCoder is not online. ToasterCoder
Joined: 28 Aug 2015
Total Posts: 137
01 Nov 2015 11:22 PM
So lets say I have this string "Agility - 47" how would I find the 47 part without knowing its 47?
Report Abuse
PvN is not online. PvN
Joined: 10 Apr 2010
Total Posts: 22145
01 Nov 2015 11:24 PM
figure it out
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
01 Nov 2015 11:24 PM
The easiest way:
print(str:match("%d+")) -- get first occurrence of 1 or more consecutive digits
or
print(str:match("%S+$")) -- get anything up until a space from the end of the string
Report Abuse
ToasterCoder is not online. ToasterCoder
Joined: 28 Aug 2015
Total Posts: 137
01 Nov 2015 11:29 PM
@PvN get off the forums if your not here to actually help
@cnt thanks
Report Abuse
Dogejia is not online. Dogejia
Joined: 08 Feb 2012
Total Posts: 1873
01 Nov 2015 11:30 PM
@cnt

I've been through the string pattern part of the wiki but I've never saw the $, explain.


Online Dogeing since 1337
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
01 Nov 2015 11:31 PM
It just starts matching from the end of the string.
Report Abuse
Dogejia is not online. Dogejia
Joined: 08 Feb 2012
Total Posts: 1873
01 Nov 2015 11:34 PM
So literally its the final value? If so thank you


Online Dogeing since 1337
Report Abuse
Dogejia is not online. Dogejia
Joined: 08 Feb 2012
Total Posts: 1873
01 Nov 2015 11:35 PM
Final as in after something


Online Dogeing since 1337
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image