我正在按照此文档页面使用应用程序设置部署 azure 功能https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/function_app
\n我的 terraform 文件如下所示:
\nterraform {\n required_providers {\n azurerm = {\n source = "hashicorp/azurerm"\n version = "3.10.0"\n }\n }\n}\n\nprovider "azurerm" {\n}\nresource "azurerm_resource_group" "example" {\n name = "azure-functions-test-rg"\n location = "West Europe"\n}\n\nresource "azurerm_storage_account" "example" {\n name = "funcdemo123shafiq"\n resource_group_name = azurerm_resource_group.example.name\n location = azurerm_resource_group.example.location\n account_tier = "Standard"\n account_replication_type = "LRS"\n}\n\nresource "azurerm_app_service_plan" "example" {\n name = "azure-functions-test-service-plan"\n location = azurerm_resource_group.example.location\n resource_group_name = azurerm_resource_group.example.name\n\n sku {\n tier = "Standard"\n size = "S1"\n }\n}\n\nresource "azurerm_function_app" "example" {\n name = …Run Code Online (Sandbox Code Playgroud) I am trying to split text into words on the basis of space but I don't want to split words in single quotes into different words.
Here if you can see word 'fd f df' is converted into three words 'fd , f , df' but I want to get this as single word like 'fd f df'.
const str = `TEST = 'fd f df' AND Pitch = 444`
str.split(/\s+/)
// ["TEST", "=", "'fd", "f", "df'", "AND", "Pitch", "=", …Run Code Online (Sandbox Code Playgroud)