I just start to use AWS cloudformation and I got a block as below:
I have a string
string = redundant_value/12b4/xyz/succes
And I want to get 12b4/xyz/succes
of the string. How would I get it?
Another example for my question:
${string} = abcd/123xx/OBcs/azy_cd
how would I get only 123xx/OBcs/azy_cd
from ${string}
Can I do this?
fn::Split: ['abcd/', ${string}] = [123xx/OBcs/azy_cd]
fn::Select: [0, [123xx/OBcs/azy_cd]]
I have read there is a method about Fn::Sub
. But I am not able to understand it yet.
CodePudding user response: