Hi Richard,
I had a look at this one. It's very weird, but the StringReplacer and
StringPairReplacer seem to use different syntax, and neither of them
use proper string encoding.
Grant is correct that the escape character is a \ - but like you say
it doesn't appear to work.
Anyway, the following are what I discovered...
StringReplacer - use Regular Expressions = No
Use: can(
StringReplacer - use Regular Expressions = Yes
Use: can\\( [ie use double escape characters]
StringPairReplacer
Use: "can(" [ie put quotes around it]
Hope this helps. Basically, if you use the StringPairReplacer just put
quotes around the source value and it seems to work OK.
Regards,
Mark
Mark Ireland, Senior Product Specialist
Safe Software Inc. Surrey, BC, CANADA
[EMAIL PROTECTED] http://www.safe.com
Solutions for Spatial Data Translation, Distribution and Access
--- In [email protected], "Richard Wilkinson" <[EMAIL PROTECTED]> wrote:
>
> Thanks for reply Grant,
>
> The example you quote from the help screen does not help. It seems that
> it is not possible to escape a "(" with "\(" as the brackets are
> interpreted before the escape character or perhaps the escape character
> only works with a particular range of characters that does not include
> brackets.
>
> However I can achieve the same ends by using StringReplacer with
> Text to find = can( and
> Replacement text = nothing
>
> I wanted to do multiple replacements wich is why I was trying to use
> StringPairReplacer. I can use a chain of StringReplacer's to do the
> multiple replacements and can in fact combine them into a custom
> transform.
>
> Thanks
>
> Richard Wilkinson
>
>
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of
> Richard Wilkinson
> Sent: 19 June 2007 17:17
> To: [email protected]
> Subject: [fme] Help with StringPairReplacer
>
>
>
> Hi,
>
> I am having dificulty in deleting a character(s) with
> stringpairreplacer. Is this possible?
>
> How can I do the following:
>
> Input string can(this be done output string this
> be done
>
>
> The replacement pair can X will produce X(this be done
> But the pair can( X produces an error
> Unbalanced parenthesis
>
> I cannot figure how to drop character(s) or escape special
> characters eg (
>
> Can anyone give me a clue, please.
>
> Thanks
>
> Richard Wilkinson
> Systems Analyst
> Resources - ICT Services
> Leicestershire County Council
> 0116 2657709
> [EMAIL PROTECTED]
>
>
> _______________________________________________________________________
>
> Leicestershire County Council - rated a 'four-star' council by
> the Audit Commission
>
>
> _______________________________________________________________________
>
>
>
>
>
>
>
>
>
> This e-mail and any files transmitted with it are confidential.
> If you are not the intended recipient, any reading, printing, storage,
> disclosure, copying or any other action taken in respect of this e-mail
> is prohibited and may be unlawful. If you are not the intended
> recipient, please notify the sender immediately by using the reply
> function and then permanently delete what you have received.
>
>
>
>
>
> Incoming and outgoing e-mail messages are routinely monitored
> for compliance with Leicestershire County Council's policy on the use of
> electronic communications. The contents of e-mails may have to be
> disclosed to a request under the Data Protection Act 1998 and the
> Freedom of Information Act 2000.
>
>
>
>
>
> The views expressed by the author may not necessarily reflect
> the views or policies of the Leicestershire County Council.
>
>
>
>
>
> Attachments to e-mail messages may contain viruses that may
> damage your system. Whilst Leicestershire County Council has taken every
> reasonable precaution to minimise this risk, we cannot accept any
> liability for any damage which you sustain as a result of these factors.
> You are advised to carry out your own virus checks before opening any
> attachment.
>
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.
Love FME? Then open your diary to March 6-7, 2008 and write this... "Second
Worldwide FME User Conference - Must Attend!" See
http://www.safe.com/company/fmeuc2008/index.php for more details.
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/