Previously it was assumed that the Amazon system-release
number was the final value of the string. This isn't always
the case. Some releases have the name at the end.
Amazon Linux release 2
Amazon Linux release 2 (Karoo)
Fix by instead looking for a number in the string.
Fixes#48823