I have multiple s3 buckets in AWS whose names are in the following syntax:
- resource-4511-deployment-1srsi6fjy9uuk
- web-4533-logbucket-dogx6k0n8967
- pcnfile6511
- 5399-bucket-6dehb5uuiwd
I'd like to extract the 4 digit number from each of these names preferably without using multiple if else loops which is the solution I can think of right now. The output should basically be
- 4511
- 4533
- 6511
- 5399