span8
span4
span8
span4
Hi FME ninjas,
I'm working on a data source that contains school names.
The names in the source are too long and need to be shortened.
Left is what I have,right is what I want:
I know the StringReplacer can be used to correct single strings - but I fear I will need to create at least 40 of these to correct all possible strings.
Is there a transformer that can replace multiple strings?Or can this be done by Regexing some transformer?If so,how?
Thanks,
Ed
Bit late in answering here,but hopefully still helpful: you can try the StringPairReplacer.It does require space-separated replacement pairs so if your text to replace contains spaces they'll need to be escaped.
If the replacements are well defined and don't change to often,you could use the AttributeValueMapper.If not,you could also look at the SchemaMapper,which can read the replacement rules from an Excel sheet or a CSV.
Hi@edhere
There is a rule to get the shortened?
For example:
On this case above is just to get the last two Words,Perfect.
But the example below?
Thanks,
Danilo
How Can I match on an ASCII Control Character inside the StringReplacer?1 Answer
How to replace string?From "Toi et Moi (Villa)" to "(Villa) Toi et Moi"4 Answers
String: select line from multi line attribute1 Answer
StringPairReplacer with Regular Expressions4 Answers
Python script to compare two datasets that involve character strings2 Answers
© 2019 亚搏在线Safe Software Inc |Legal