Skip to main content
Solved

Hello, Can please someone let me know how to remove all extra characters form values in column. More specifically how I can get Table two from Table 1. FYI, I am using FME2022.

  • September 19, 2023
  • 3 replies
  • 30 views

Forum|alt.badge.img

Table 1Table 1 

Table 2

Table 2

Best answer by ebygomm

Hi @ebygomm thanks for your answer. I used a string searcher with the above regex on my real dataset, but it filtered the data into two ports, those rows contain the regex and rows not contain the regex. However, I used a AttributeSplitter and split the values based on ( character (First part of a parentheses).

After the string searcher you just need to send both matched and unmatched ports to the same place

imageYou could also instead use a StringReplacer and replace everything that occurs from the bracket and beyond with nothing

image

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

ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • September 19, 2023

You could use a string searcher with the following regex

.+(?=\s\()

Which will match everything that occurs before a space and opening bracket


Forum|alt.badge.img
  • Author
  • September 20, 2023

You could use a string searcher with the following regex

.+(?=\s\()

Which will match everything that occurs before a space and opening bracket

Hi @ebygomm thanks for your answer. I used a string searcher with the above regex on my real dataset, but it filtered the data into two ports, those rows contain the regex and rows not contain the regex. However, I used a AttributeSplitter and split the values based on ( character (First part of a parentheses).


ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • Best Answer
  • September 20, 2023

Hi @ebygomm thanks for your answer. I used a string searcher with the above regex on my real dataset, but it filtered the data into two ports, those rows contain the regex and rows not contain the regex. However, I used a AttributeSplitter and split the values based on ( character (First part of a parentheses).

After the string searcher you just need to send both matched and unmatched ports to the same place

imageYou could also instead use a StringReplacer and replace everything that occurs from the bracket and beyond with nothing

image