Hi Jianwu,
You would need to protect the backslash with a backslash.
Try replaceAll("a", "\\"")
I'm not sure if that will work.

In general, backslashes are somewhat evil.

For example: Is the string "\bc" three characters: backslash, b and c or two characters: backspace and c?

I'm not sure what replaceAll method you are calling here, I'm guessing you are invoking that method on a String?

A small test model would help.

I'm not confident that backslashes work well in the expression lange.

_Christopher

On 5/3/13 3:16 PM, Jianwu Wang wrote:
Hi Christopher,

I'm using "Expression Evaluator" trying to replace some strings to backslash, such as from "abc" to "\bc". Command like replaceAll("a","\") always has error: Found unterminated string : "\"). Similar attempts also failed.

I searched Kepler/Ptolemy documents and mailing lists and didn't find answer. Would you please help me out? Thanks.


--
Christopher Brooks, PMP                       University of California
Academic Program Manager & Software Engineer  US Mail: 337 Cory Hall
CHESS/iCyPhy/Ptolemy/TerraSwarm               Berkeley, CA 94720-1774
c...@eecs.berkeley.edu, 707.332.0670           (Office: 545Q Cory)

_______________________________________________
Kepler-users mailing list
Kepler-users@kepler-project.org
http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users

Reply via email to