Skip to main content
Question

Expand regex editor to AttributeTrimmer


p_c_20
Supporter
Forum|alt.badge.img+8

Would be great if Regex Editor and AI assist was added into AttributeTrimmer rather than having to use the Regex functions in text editor, which are clunkier. In fact, it could go in any and all string transformers where you are trying to identify, use or replace a substring. 

7 replies

alexbiz
Enthusiast
Forum|alt.badge.img+13
  • Enthusiast
  • June 23, 2025

AttributeTrimmer only remove leading and trailing characters of an attribute.

https://docs.safe.com/fme/html/FME-Form-Documentation/FME-Transformers/Transformers/attributetrimmer.htm

It would be weird to use regex here.

 

You might want to use the StringReplacer instead, which can use regex and replace with no character.


p_c_20
Supporter
Forum|alt.badge.img+8
  • Author
  • Supporter
  • June 23, 2025
alexbiz wrote:

AttributeTrimmer only remove leading and trailing characters of an attribute.

https://docs.safe.com/fme/html/FME-Form-Documentation/FME-Transformers/Transformers/attributetrimmer.htm

It would be weird to use regex here.

 

You might want to use the StringReplacer instead, which can use regex and replace with no character.

How about if I want to left trim [^\w] down to nothing?


alexbiz
Enthusiast
Forum|alt.badge.img+13
  • Enthusiast
  • June 23, 2025

 


p_c_20
Supporter
Forum|alt.badge.img+8
  • Author
  • Supporter
  • June 23, 2025
alexbiz wrote:

 

Yes, but left/right trim, not replacing in the middle of a string (which is what this would do, right?)


alexbiz
Enthusiast
Forum|alt.badge.img+13
  • Enthusiast
  • June 23, 2025

^ mean the start of the string

$ mean the end of the string

 

^\w* litteraly translate to “all word characters (from 0 to x) at the beginning of the string”


alexbiz
Enthusiast
Forum|alt.badge.img+13
  • Enthusiast
  • June 23, 2025

So this is a left trim, it will not replace value in the middle of your value


p_c_20
Supporter
Forum|alt.badge.img+8
  • Author
  • Supporter
  • June 23, 2025
alexbiz wrote:

So this is a left trim, it will not replace value in the middle of your value

Ah. Many thanks


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings