get last digit of number java code example Example: how to find last digit in number by regex in java (\d+)(?!.*\d)