Text to Find: FAIRFIELD WORKS, FAIRFIELD, AL 35064
Replacement Text: FAIRA
Use regular Expressions: No
Case Sensitive: No
How can I get rid of 35064.
thanks
Dan
Text to Find: FAIRFIELD WORKS, FAIRFIELD, AL 35064
Replacement Text: FAIRA
Use regular Expressions: No
Case Sensitive: No
How can I get rid of 35064.
thanks
Dan
Use regular Expressions: YES
expose or use creator or renamer on "matched_parts{0}"
Please check the input attribute value.
If the attribute stores "FAIRFIELD WORKS, FAIRFIELD, AL 35064 35064" (the number is duplicated), the resulting string will be "FAIRA 35064" naturally.
Takashi
i changed the regexp to ([a-zA-Z,\\s]*)\\s\\d*
(FME regexp flavor does'nt want to do
(.*)\\s\\d* or ([\\w,\\s]*)\\s\\d* Though in other aplications it works like above)
If u have specific objects that need changed u need to test for those yes.
In conditional you need to use different aproach, u can use tcl string and listfunctions.
Though this is somewhat more complex
You could do like conditional:
test condition:
@Value(adres) like %FAIRFIELD%
outputfield:@Evaluate([string replace {@Value(tst)} @Evaluate([lindex {@Evaluate(@Evaluate([regexp -indices {(.*)\\s\\d*} {@Value(tst)} M SM])==1?"$SM":"none")} 0]) @Evaluate([lindex {@Evaluate(@Evaluate([regexp -indices {([a-zA-Z,\\s]*)\\s\\d*} {@Value(tst)} M SM])==1?"$SM":"none")} 1]) {@Value(Replacement)}])
...;)
i set a attribute @Value(Replacement) to "FAIRA "
this replaces "FAIRFIELD WORKS, FAIRFIELD, AL 35064" to "FAIRA 35064"
You might not want to go there and just use transformers: tester, stringsearchers and stringreplacers.
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.