I'm trying to build a RegEx that extracts the region (us-east-1) from the following AWS ARN:
arn:aws:secretsmanager:us-east-1:123456789012:secret:catsndogs-3HieNb
I've tried using ([^:]*)
which creates groups, but I can't seem to grab the value of the 4th group, i.e. us-east-1.
[^:]*(?=:\d+:)
.