You can do this by getting the log base 10 of the number. [[expr log10($number)]] You can get the regexp of the number, and then get the string length of the digits to the right and left of the decimal point. [[ [Category Mathematics] ]]