小编Mic*_*ael的帖子

如何在第三个字符后插入连字符

我想删除字符串的前三个字符,并在其余6个字符的第3和第4个之间插入连字符.例如输入:

123456789
Run Code Online (Sandbox Code Playgroud)

输出:

456-789
Run Code Online (Sandbox Code Playgroud)

我的正则表达式删除前三个字符,但我不知道如何插入连字符.

(^.{3})(\w+) $2
Run Code Online (Sandbox Code Playgroud)

regex

1
推荐指数
1
解决办法
1447
查看次数

Azure-Bicep:如何将 blob 容器添加到存储帐户

所以,我有一个 StorageAccount.bicep

//StorageAccount.bicep
param storageAccountSku string = 'Standard_LRS'
param storageAccountName string
param storageAccountType string = 'StorageV2'

resource storageAccount 'Microsoft.Storage/storageAccounts@2021-08-01' = {
  name: storageAccountName
  location: location
  tags: tags
  sku: {
    name: storageAccountSku
  }
  kind: storageAccountType
}

output name string = storageAccount.name
Run Code Online (Sandbox Code Playgroud)

在main.bicep中,它调用StorageAccount.bicep来创建容器。

module storage_account_1 'modules/storageAccount.bicep' = {
  name: 'storage_account1'
  scope: rg
  params: {
    storageAccountSku: 'Standard_LRS'
    storageAccountType: 'StorageV2'
    storageAccountName: 'storage_account1"
}
}
Run Code Online (Sandbox Code Playgroud)

第二个存储帐户

var storageName = toLower('${envType}${rgNameUid}${toLower(app)}')
    module storage_account_2 'modules/storageAccount.bicep' = {
      name: 'storage_account2'
      scope: rg
      params: {
        storageAccountSku: 'Standard_LRS'
        storageAccountType: 'StorageV2' …
Run Code Online (Sandbox Code Playgroud)

azure azure-resource-manager azure-blob-storage azure-bicep

1
推荐指数
1
解决办法
3348
查看次数