package main
import (
"fmt"
"regexp"
"strconv"
)
func extractLastNumber(str string) int {
re := regexp.MustCompile(`\d+`)
matches := re.FindAllString(str, -1)
lastNumber, _ := strconv.Atoi(matches[len(matches) - 1])
return lastNumber
}
func main() {
str := "go 84 programming2309"
n := extractLastNumber(str)
fmt.Println(n)
}
/*
run:
2309
*/