Skip to main content

I

Are you wanting to replace multiple words with one single word? In which case you can use regex matching to specify multiple words.

 

Or if you have multiple words you want to replace, each replaced with a different value you can look at the StringPairReplacer


Hi,

I wish to remove certain words from a postal address completely.

Using the StringReplacer I tried using the text editor like you mentioned in the 'Text To Replace' option to build a SQL style query

In ArcMap this would be

[Address] = "Value1" or [Address] = "Value2" to select the words to remove

 

in FME text editor I tried the following (and may well have this completely wrong)

@Value(Address) = "Value1" or @Value="Value2"

But it doesn't seem to be finding the values

I am leaving the Replacement Text box blank

 

Thanks

Mark

 

 


Hi,

I wish to remove certain words from a postal address completely.

Using the StringReplacer I tried using the text editor like you mentioned in the 'Text To Replace' option to build a SQL style query

In ArcMap this would be

[Address] = "Value1" or [Address] = "Value2" to select the words to remove

 

in FME text editor I tried the following (and may well have this completely wrong)

@Value(Address) = "Value1" or @Value="Value2"

But it doesn't seem to be finding the values

I am leaving the Replacement Text box blank

 

Thanks

Mark

 

 

Try using a Regular Expression: oValue1|Value2] should work. Make sure to set the mode to "Replace Regular Expression" though.


Hi,

I wish to remove certain words from a postal address completely.

Using the StringReplacer I tried using the text editor  like you mentioned in the 'Text To Replace' option to build a SQL style query 

In ArcMap this would be

pAddress] = "Value1" or oAddress] = "Value2" to select the words to remove

 

in FME text editor I tried the following (and may well have this completely wrong) 

@Value(Address) = "Value1" or @Value="Value2"

But it doesn't seem to be finding the values

I am leaving  the Replacement Text box blank

 

Thanks

Mark

 

 

If you use mode regular expression, you can build a regular expression to match multiple words and replace with nothing, e.g. to replace dog or cat you could use

\bcat\b|\bdog\b

the \b before and after the words indicates a word boundary, this means that you only match instances of cat and dog not catchment or dogwood. The | means or


Hello,

Thank you @ebygomm and @redgeographics for your help - that's worked perfectly

I am new to the forums - can I mark this post as answered?

 

Mark


Hello,

Thank you @ebygomm and @redgeographics for your help - that's worked perfectly

I am new to the forums - can I mark this post as answered?

 

Mark

There should be options at the bottom of each post

 

Upvote * Reply *Select as Best

 

Select as Best will mark the question as answered


Reply