Created
August 17, 2020 12:01
-
-
Save joerx/f211cbb64251a5f9eca5878ad8b38743 to your computer and use it in GitHub Desktop.
Shorten AWS region name using regex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "eu-central-1" | sed -E s'/([a-z]{2})-([a-z]{1})[a-z]+-([0-9]{1})/|\1\2\3|/' # 'euc1' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment