Hi Hans

your probles is that, in regexp a | means 'or' for exampe abc|def will match 
a string with 'abc' or 'def' in. to get around the problem you can try
1. try escaping with a \ - \|
2. try putting it in bracets [] - [\]

both are working in tcl outside fme

the tcl command look like this, so if the stringRelacer dont work try the 
TclExecuter

proc removePipe {yourAttr} { regsub -all -- {[|]} [FME_GetAttribute 
$yourAttr ] {} }

or better this

proc removePipe {yourAttr} {
    FME_SetAttribute $yourAttr [ regsub -all -- {[|]} [FME_GetAttribute 
$yourAttr ] {} ]
}


note this about Tcl and FME
1. always put a tcl expresion into a proc
2. use the FME_GetAttribute/FME_SetAttribute  to manipulate attributes 
rather than parsing in the values as paramters
3. alwasy use Tcl2 rather than TCL

the above notes and exampels will also work with removing commas and " etc.

Peter


>From: Hans van der Maarel <[EMAIL PROTECTED]>
>Reply-To: [email protected]
>To: [email protected]
>Subject: [fme] StringReplacer question
>Date: Tue, 24 Oct 2006 17:06:04 +0200
>
>Anybody know how to remove "|" characters from a string? A
>StringReplacer won't do it. Entering just the | still causes the
>features to pass through untouched, using regexes fails because I can't
>escape it...
>--
>Hans van der Maarel
>Red Geographics
>www.redgeographics.com / [EMAIL PROTECTED]
>
>
>
>
>For insights into what's up at Safe Software and what's on the development 
>horizon, visit Safe's blog at spatial-etl.blogspot.com.
>
>Safe Software has also made slides available that outline enhancements 
>planned for FME 2007. The slides are from the "Road Ahead" presentation 
>given on Day 2 of the FME Worldwide Users Conference. To view these slides, 
>visit www.safe.com/2006uc.
>
>
>Yahoo! Groups Links
>
>
>
>

_________________________________________________________________
Få de bedste søgeresultater med MSN Search:  http://search.msn.dk




For insights into what's up at Safe Software and what's on the development 
horizon, visit Safe's blog at spatial-etl.blogspot.com.

Safe Software has also made slides available that outline enhancements planned 
for FME 2007. The slides are from the "Road Ahead" presentation given on Day 2 
of the FME Worldwide Users Conference. To view these slides, visit 
www.safe.com/2006uc.

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/fme/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/fme/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to