span8
span4
span8
span4
Hi!
I am kind of new to FME so this must be a simple issue to solve for anyone in here.
I have a xls-file with zip codes,5 characters together.I want to add a blank space between the third and the fourth character.I just can´t find a simple way to do it with my limited knowledge...
Thanks,
Tobias
Looks like all the ways I tried could have worked if I just had done it right!
Thanks to all of you!
You can also use a StringReplacer,then you only need one transformer:
Replacement text has a space between \1 and \2
Source String: BobbyText to Find: b*yReplacement Text: --\\0-\\0Use Regular Expression: yesCase Sensitive: yesResult: Bo--bby-bby
If the replacement text contains & or \0,then it is replaced in the substitution with the portion of string that matched the regularexpression.\0 or & does not seem to work for me at all,just as Takashi says.
You can use \0 as a placeholder for the whole regex match,and \1 through \9 for the text matched by one of the first nine capturing groupsSo I think we need to update the doc to be more clear that the parts list starts at 1,and that 0 is the whole of the match.
Another way is using the AttributeCreator with the expression for the new value:
@Substring(@Value(test),0,3) @Substring(@Value(test),3,2)
This assumes the old attribute to be "test".
Or you could use an AttributeManager (or AttributeCreator) create a new attribute,open the text editor dialog,and enter:
@Left(@Value(zip),3) @Right(@Value(zip),2)
Obviously there is a space between the two of those functions.
Or just use the following formula in an attributecreator
@Left(@Value(zip),3) @Right(@Value(zip),2)
You could use an AttributeSplitter with format string 3s2s,this creates a list with 2 elements,let's call them _list{0} and _list{1}.The first one holds the first three characters,the second one the last two.
Then an AttributeCreator that creates a new attribute which is the value of _list{0},then a space and then the value of _list{1}
© 2019 亚搏在线Safe Software Inc |Legal