I have a table that contains a field with street names. Each street name ends with the street type. Fore example, Washington St, Happy Valley Rd, Redstone Dr. I need to extract the last part of the street name and have it populate a field called Street Type. I been trying to use the AttributeSplitter transformer but it only splits strings according to a delimiter (in this case it's a space), but this does not work. Any suggestion on using a different transformer or combination of transformers? Solutions need to be in FME as this task is part of a greater workflow.

2 Answers 2


Try the Regular Expressions.

It has been some time since I've used FME, but I know a while back they had a Regular Expressions Transformer (or the AttributeSplitter had a Regular Expressions option).

You should be able to use a regular expression to match some form of pattern.
For example, the address:

123 abc st, Sesame Street

could be matched by the regular expression:


Which indicates the pattern as,

  1. from the start of the string ($)
  2. there will be a sequence of digits : [0-9]+
  3. followed by a white space character (space, tab, etc) : \w
  4. followed by a string consisting of Upper and Lower case alpha characters: [a-zA-Z]+
  5. followed by the string of interest in the pattern: ([st|dr|av]) *NOTE
  6. followed by any number of white space and alpha characters: [\wa-zA-Z]+

NOTE The parenthesis () tag that part of the pattern to an attribute that you can use later on in your FME script.

I hope this gives you some pointers. I'll follow this question to help further if required.

  • I had a felling it was going to involve some funky expression. I also just found this. I'll give both a try. Thanks for chiming in.
    – dchaboya
    Commented Mar 27, 2012 at 19:24

SubstringExtractor should work too

Category: Strings

Extracts a substring from the source attribute. The substring is taken from the range of characters specified. Character indexes start at 0 for the first character. A negative index is used to indicate the position relative to the end of the string (-1 is the last character, -2 the second last, and so on). The index can also be taken from the value of another attribute.

If the last index is greater than or equal to the length of the string then it is treated as if it were the end of the string. If the first index is greater than the last index then an empty string is placed into the result attribute.

Each of the index parameters may either be entered as a number, or can be taken from the value of a feature attribute by selecting the attribute name from the pull-down list.


To trim off the first character only, use a start of 1 and an end of -1 To trim off the last character only, 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


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.