I have an attribute called type and within it the following values
Floor:FLR1009
Slab:SLB2435
DOR-1000
WAL-2000
I want to remove the Floor: and the Slab:
Id rather use a string renamer if possible as the Floor: and Slab: will be constant.
Thanks
Chris.
Best answer by takashi
Yes, it seems to be a case where you can use regular expressions effectively and I agree that the StringSearcher would be a good starting point. If you have been familiar with regular expressions already, however, I think the StringReplacer would be an elegant solution to remove the leading "Floor:" or "Slab:" from each string value. The parameters would be:
Yes, it seems to be a case where you can use regular expressions effectively and I agree that the StringSearcher would be a good starting point. If you have been familiar with regular expressions already, however, I think the StringReplacer would be an elegant solution to remove the leading "Floor:" or "Slab:" from each string value. The parameters would be:
This is what Im using and all but the last part works perfectly.
The Assembled Stair: returns Stair: and I think because of the space, so Ive tried \\s. It works OK with the regex tester but I doesnt replace the string in FME.
Do you think this is the best way to remove this also? I may have up to 10 strings to replace.
I guess that the requirement is to remove the leading part until the colon if the original string contains a colon. If so, the StringReplaceer with this regular expression could work too.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.