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