Skip to main content
Question

split an attribute into numbers and characters

  • May 23, 2013
  • 3 replies
  • 377 views

Dear all, starting to really make use of and learning FME and loving it! However I am getting stuck on a seemingly simple task: I have a land title attribute which may look like TP12345 and I need to split it into two new attributes, one with the characters and one the integers (and retain the exising one). Any useful hints are greatly apreciated!
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

takashi
Celebrity
  • May 24, 2013
Hi Nic,   The StringSeacher transformer would be the most flexible solution in such a case. An example of regular expression is: ^([A-Z]+)([0-9]+)$   If you are not familiar with the regular expression, see Regular-Expressions.info. Alternatively, if the number of the alphabetical characters is always 2, two SubstringExtractors are also available.

 

 

Takashi  

  • Author
  • May 24, 2013
Thanks Takashi! Substring extractors did the job. Happy boy again!

ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • May 24, 2013
As an alternative if the string is always two digits followed by 5 numbers you can use the Attribute splitter to split at set intervals by using a format string of 2s5s

 

 

Much neater than multiple substring extractors if you want to start splitting a string into more than 2 parts.