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