Some output from commands has a comma immediately after the output number:
nat-limit statistics:
max entry: max allowed 0, used 0, missed 0
I can parse the result as a string, but want to grab the data as a number so I can do other operations (math/comparison/etc).
I can remove the comma with a replacement function (thanks
cleanComma(s) = replaceMatches(s, ",", "");
however the output, even while being a number (0) is still considered a string.
Looking at toNumber, the documentation gives the warning it is for IPv4 addresses only.
Is there a way to convert a string into a number variable type?




