Terraform azure data "azurerm_image" regex cannot get both 2 and 3 digits

I have below terraform code to look for latest image. But the problem is it cannot look for images that has both 2 and 3 digits after “b” in “name_regex”

data “azurerm_image” “prod_image” {
name_regex = “^test-${var.os}-b\d+”

resource_group_name = “${data.azurerm_resource_group.linux_rg.name}”
sort_descending = true

we have centos and ubuntu images with build numbers like below, above code looks for only 2 digits after “b” and gets highest number(Ex “99” is highest is 2 digit), how to looks for both 2 and 3digits and get highest number

Images names in storage are like below:

test-ubuntu-b46 – need to get this latest image

For centos we have like below 3 digits:

test-centos-b121 – need to get this latest image

How to match regex for both 2 and 3 digits.

Terraform version 0.11.14