title: How can i replace some string in cloudformation aws
body: <p>I have cloudformation Template where i have one parameter passed from previous step  with value like this</p>
  
  <pre><code> "test1.example.org"
  
   "example.org"
  
   "org"
  </code></pre>
  
  <p>now i want to basically remove the .org part from that parameter and get</p>
  
  <pre><code>test1.example
  
  example
  </code></pre>
  
  <p>There can be many subdomain as well like</p>
  
  <pre><code>test1.test2.test3.test4.example.org
  </code></pre>
  
  <p>I just need to remove .org from the end</p>