Skip to main content

Hi there,

I want to remove all spaces after a string. Example:

TestString1e ]TestString2T   ] 

whereas only the empty spaces after TestString2 should be removed.

I have a solution for removing leading spaces with the StringReplacer which is ^t\s]* but I want to remove only the empty spaces at the end.

Many thanks and kind regards

Thomas

Use an AttributeTrimmer with Trim Type Right and Trim Characters {space}


Use an AttributeTrimmer with Trim Type Right and Trim Characters {space}

If you wanted to go the regex route it would be [\\s]*$


Many thanks @jdh The AttributeTrimmer works perfectly! I had forgotten how many wonderfuly transformers FME has on board 🙂 And thank you also for the tip with the regex, have to learn this topic very soon :)


Reply