I'm trying to delete whitespace in a string using this expression
replace(Trim(triggerOutputs()?['body/Title']),' ','.')
This is for a SharePoint triggered flow and the title was renamed to "Full legal name" in the associated list. It trims the ends just fine. But according to this article (https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-trim), trim should eliminate the extra spaces in the string (it even shows it in one of their examples) as opposed to TrimEnds. And yes, once the string is trimmed, I need to replace the space with a period. I'm using this to generate what their email address will be for later on in the flow.
Currently, if their name comes in as "Desaad Joker ", it will trim off the whitespace at the ends and replace the two spaces in the string with periods "Desaad..Joker". What am I missing?