Skip to main content
Question

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

  • December 20, 2022
  • 2 replies
  • 133 views

aaron
Contributor
Forum|alt.badge.img+12
  • Contributor
  • 73 replies

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

david_r
Celebrity
  • 8391 replies
  • December 20, 2022

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


aaron
Contributor
Forum|alt.badge.img+12
  • Author
  • Contributor
  • 73 replies
  • December 20, 2022

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