我有 cloudformation 模板,其中我有一个从上一步传递的参数,其值是这样的
"test1.example.org"
"example.org"
"org"
Run Code Online (Sandbox Code Playgroud)
现在我想基本上从该参数中删除 .org 部分并获取
test1.example
example
Run Code Online (Sandbox Code Playgroud)
也可以有很多子域,例如
test1.test2.test3.test4.example.org
Run Code Online (Sandbox Code Playgroud)
我只需要从最后删除 .org