Brutal 164 Posted March 24, 2015 Report Share Posted March 24, 2015 I found code here: http://jsfiddle.net/sMgSp/110/that will remove the leading zeros from a string.... Anyone know how I would make that work in ubot on the contents of a variable? example.... var string =000012000123012000 I would want the end result to be: 1212312000 Quote Link to post Share on other sites
diskwizz 24 Posted March 24, 2015 Report Share Posted March 24, 2015 There you go "[1-9]+[0-9]*|^[0]$". So it get's the number without leading zero's but also captures the number if it's just 0. Quote Link to post Share on other sites
Brutal 164 Posted March 25, 2015 Author Report Share Posted March 25, 2015 Thank you! Very appreciated. Quote Link to post Share on other sites
diskwizz 24 Posted March 25, 2015 Report Share Posted March 25, 2015 Thank you! Very appreciated.Your more then welcome, literally took me halve a minute to write it down Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.