Question

How to trim leading and trailing forward slashes from a string?

  • 20 December 2022
  • 2 replies
  • 12 views

Badge +8

I'm trying to use the AttributeTrimmer to trim forward slashes from the beginning and end of a string (e.g. - /SomeText/) but I can't find the correct escape character. Thought it was a backslash. Who knows what I need to use to trim /SomeText/ to SomeText? (FME Desktop 2020.1.2.1 - build 20624).

 

Thanks,

 

Aaron


2 replies

Userlevel 4

No escape character should be necessary, you can simply use / as the trim character.

Badge +8

No escape character should be necessary, you can simply use / as the trim character.

Confirmed. Thanks @david_r​ . That's what I tried initially - or thought I did. Must have made a misstep somewhere. Thanks again!

 

Aaron

Reply