2013-06-23

FME String Functions

Recently I found the documentation about this subject > FME String Functions
These functions can be used in the Advanced Text Editor for the AttributeCreator etc. In some cases operating strings, using those effectively, we can reduce dramatically the number of transformers on the canvas.

Community > Attribute Trimmer
For example, just one AttributeCreator with the following expression as the value parameter for new attribute completes the job required in the question:
@ReplaceRegEx(@Value(AttrName),(.*)(...),\1)@Format(%03d,@Evaluate(@int(@ReplaceRegEx(@Value(AttrName),(.*)(...),\2))+1))

However, I don't know whether it's preferable or not from the viewpoint of maintainability. If using too many functions in a expression, it would become difficult to understand.
Use them moderately.

No comments:

Post a Comment