NumExtract-func
This function takes a mixed string "str$" and returns the count-th consecutive digit block. If count is omitted it defaults to 1 (i.e. return the first block).
string NumExtract(string str$[, int count, int decimal])$
str$
count
decimal
Returns the count-th consecutive digit block in str$.
numextract("1-413-586-2013",2)$=; //should return 413 numextract("1-413-586-2013",0)$=; //should return 2013 numextract("Jan-12")=; //should return 12, "-" in a string will not be treated as minus sign NumExtract("abcd12,343")$=; //should return 12, compare with next script NumExtract("abcd12,343", 1, 1)$=; //should returns 12,343, starting from "1" and "12,343" is treated as one number "12.343"
NumBreak