Skip to content

Instantly share code, notes, and snippets.

View HamburgerPlsdotexe's full-sized avatar
🍑

HamburgerPlsdotexe

🍑
View GitHub Profile
@HamburgerPlsdotexe
HamburgerPlsdotexe / gist:10c52dec7d45aa34352d3990d715c51a
Created May 31, 2022 09:48
Regex for finding/matching the Azure Region names in "az account list-locations -o table"
\b([a-z]+\\d?[a-z]+\\d?)
The pattern above will match only the lowercase region names of the az cli command "az account list-locations -o table"
Try pasting the table output below inside https://regex101.com/ or https://regexr.com/
DisplayName Name RegionalDisplayName
------------------------ ------------------- -------------------------------------
East US eastus (US) East US
East US 2 eastus2 (US) East US 2