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.


Forum|alt.badge.img

Table 1Table 1 

Table 2

Table 2

Best answer by ebygomm

jkh wrote:

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

View original
Did this help you find an answer to your question?

3 replies

ebygomm
Influencer
Forum|alt.badge.img+39
  • 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
ebygomm wrote:

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+39
  • Influencer
  • Best Answer
  • September 20, 2023
jkh wrote:

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings