skip to Main Content

I wanted to check what all characters can be present in Subscription id of Azure Subscription. I saw documentation here but it mentions format of id as something like 0000-0000-0000-000000000000. It does no tells me what all characters are valid in the format. e.g. can Subscription id contain "_" or any other character

I tried referring documentation but could not find the required information

2

Answers


  1. Azure subscription ID is a globally unique identifier (GUID).
    The following article discuss how to validate GUID using Regular Expression. I think it would help you link here

    guid doc

    Login or Signup to reply.
  2. Here is the RegEx for your question

    @"^({{0,1}([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}}{0,1})$"
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search