FME Transformers: 2024.1

Categories
Calculated Values
Strings

SubstringExtractor

Extracts a substring from the source attribute. The substring is taken from the range of characters specified.

Examples

  • To trim off the first character only, and extract the rest of the source string, use a start of 1 and an end of -1.
  • To trim off the last character only, and extract the rest of the source string, use a start of 0 and an end of -2.
  • To extract the second and third characters in the string, use a start of 1 and an end of 2.
  • To trim off a single character only, use a start of 4 and an end of 4.
  • If you want to split the four first characters of the string ABCDE, use four SubstringExtractor transformers and set their respective properties as follows:

0,0

1,1

2,2

3,3

Configuration

Parameters

Editing Transformer Parameters

Transformer parameters can be set by directly entering values, using expressions, or referencing other elements in the workspace such as attribute values or user parameters. Various editors and context menus are available to assist. To see what is available, click beside the applicable parameter.

For more information, see Transformer Parameter Menu Options.

FME Community

The FME Community is the place for demos, how-tos, articles, FAQs, and more. Get answers to your questions, learn from other users, and suggest, vote, and comment on new features.

Search for all results about the SubstringExtractor on the FME Community.